Ok, so this is reaallly doing my head in now
The years ive spent doing this, ive never found something so weird before.
Im instering a new row into a database using all the data from the last database row that was insterted.
Heres my code:
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM `vhey` ORDER BY `id` DESC LIMIT 1"));
$dupetrouble = $fetch->trouble;
$dupeheader = $fetch->header;
$dupeslogan = $fetch->slogan;
$dupeimg1 = $fetch->img1;
$dupetext1 = $fetch->text1;
$dupeimg2 = $fetch->img2;
$dupetext2 = $fetch->text2;
$dupeimg3 = $fetch->img3;
$dupetext3 = $fetch->text3;
$dupeimg4 = $fetch->img4;
$dupetext4 = $fetch->text4;
$dupefooter = $fetch->footer;
$dupedate = $fetch->date;
$dupelink1 = $fetch->link1;
$dupelink2 = $fetch->link2;
$dupelink3 = $fetch->link3;
$dupelink4 = $fetch->link4;
$dupetroublelink = $fetch->troublelink;
$dupehead1 = $fetch->head1;
$dupehead2 = $fetch->head2;
$dupehead3 = $fetch->head3;
$dupehead4 = $fetch->head4;
$dupetext5 = $fetch->text5;
$dupeimg5 = $fetch->img5;
$dupelink5 = $fetch->link5;
$dupehead5 = $fetch->head5;
$dupehits1 = "0";
$dupehits2 = "0";
$dupehits3 = "0";
$dupehits4 = "0";
$dupehits5 = "0";
$dupepicno = $fetch->picno;
$dupepicno2 = $fetch->picno2;
$dupepicno3 = $fetch->picno3;
$dupepicno4 = $fetch->picno4;
$dupepicno5 = $fetch->picno5;
mysql_query("INSERT INTO `vhey` (`id`, `trouble`, `header`, `slogan`, `img1`, `text1`, `img2`, `text2`, `img3`, `text3`, `img4`, `text4`, `footer`, `date`, `link1`, `link2`, `link3`, `link4`, `troublelink`, `head1`, `head2`, `head3`, `head4`, `text5`, `img5`, `link5`, `head5`, `hits1`, `hits2`, `hits3`, `hits4`, `hits5`, `picno`, `picno2`, `picno3`, `picno4`, `picno5`)
VALUES (
'', '$dupetrouble', '$dupeheader', '$dupeslogan', '$dupeimg1', '$dupetext1', '$dupeimg2', '$dupetext2', '$dupeimg3', '$dupetext3', '$dupeimg4', '$dupetext4', '$dupefooter', '$dupedate', '$dupelink1', '$dupelink2', '$dupelink3', '$dupelink4', '$dupetroublelink', '$dupehead1', '$dupehead2', '$dupehead3', '$dupehead4', '$dupetext5', '$dupeimg5', '$dupelink5', '$dupehead5', '$dupehits1', '$dupehits2', '$dupehits3', '$dupehits4', '$dupehits5', '$dupepicno', '$dupepicno2', '$dupepicno3', '$dupepicno4', '$dupepicno5')");
When trying to insert it all at the same time, it does not create a new row because theres some errors somewhere, so ive had to trial and error to find out which ones do work and which do not.
So im just wondering why some of the data will go in and some wont.
I also got it setup looking like:
$dupetrouble = $fetch->trouble;
$dupeheader = $fetch->header;
$dupeslogan = $fetch->slogan;
$dupeimg1 = "";
$dupetext1 = "";
$dupeimg2 = "";
$dupetext2 = "";
$dupeimg3 = "";
$dupetext3 = "";
$dupeimg4 = "";
$dupetext4 = "";
$dupefooter = $fetch->footer;
$dupedate = $fetch->date;
$dupelink1 = $fetch->link1;
$dupelink2 = $fetch->link2;
$dupelink3 = $fetch->link3;
$dupelink4 = $fetch->link4;
$dupetroublelink = $fetch->troublelink;
$dupehead1 = $fetch->head1;
$dupehead2 = $fetch->head2;
$dupehead3 = "";
$dupehead4 = $fetch->head4;
$dupetext5 = $fetch->text5;
$dupeimg5 = $fetch->img5;
$dupelink5 = $fetch->link5;
$dupehead5 = $fetch->head5;
$dupehits1 = "0";
$dupehits2 = "0";
$dupehits3 = "0";
$dupehits4 = "0";
$dupehits5 = "0";
$dupepicno = $fetch->picno;
$dupepicno2 = $fetch->picno2;
$dupepicno3 = $fetch->picno3;
$dupepicno4 = $fetch->picno4;
$dupepicno5 = $fetch->picno5;
So for the fields that i cant get the info to come from, ive replaced with "" and that works. So why is it some of the contents of the previous row cannot be inserted into a new one ?
The years ive spent doing this, ive never found something so weird before.
Im instering a new row into a database using all the data from the last database row that was insterted.
Heres my code:
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM `vhey` ORDER BY `id` DESC LIMIT 1"));
$dupetrouble = $fetch->trouble;
$dupeheader = $fetch->header;
$dupeslogan = $fetch->slogan;
$dupeimg1 = $fetch->img1;
$dupetext1 = $fetch->text1;
$dupeimg2 = $fetch->img2;
$dupetext2 = $fetch->text2;
$dupeimg3 = $fetch->img3;
$dupetext3 = $fetch->text3;
$dupeimg4 = $fetch->img4;
$dupetext4 = $fetch->text4;
$dupefooter = $fetch->footer;
$dupedate = $fetch->date;
$dupelink1 = $fetch->link1;
$dupelink2 = $fetch->link2;
$dupelink3 = $fetch->link3;
$dupelink4 = $fetch->link4;
$dupetroublelink = $fetch->troublelink;
$dupehead1 = $fetch->head1;
$dupehead2 = $fetch->head2;
$dupehead3 = $fetch->head3;
$dupehead4 = $fetch->head4;
$dupetext5 = $fetch->text5;
$dupeimg5 = $fetch->img5;
$dupelink5 = $fetch->link5;
$dupehead5 = $fetch->head5;
$dupehits1 = "0";
$dupehits2 = "0";
$dupehits3 = "0";
$dupehits4 = "0";
$dupehits5 = "0";
$dupepicno = $fetch->picno;
$dupepicno2 = $fetch->picno2;
$dupepicno3 = $fetch->picno3;
$dupepicno4 = $fetch->picno4;
$dupepicno5 = $fetch->picno5;
mysql_query("INSERT INTO `vhey` (`id`, `trouble`, `header`, `slogan`, `img1`, `text1`, `img2`, `text2`, `img3`, `text3`, `img4`, `text4`, `footer`, `date`, `link1`, `link2`, `link3`, `link4`, `troublelink`, `head1`, `head2`, `head3`, `head4`, `text5`, `img5`, `link5`, `head5`, `hits1`, `hits2`, `hits3`, `hits4`, `hits5`, `picno`, `picno2`, `picno3`, `picno4`, `picno5`)
VALUES (
'', '$dupetrouble', '$dupeheader', '$dupeslogan', '$dupeimg1', '$dupetext1', '$dupeimg2', '$dupetext2', '$dupeimg3', '$dupetext3', '$dupeimg4', '$dupetext4', '$dupefooter', '$dupedate', '$dupelink1', '$dupelink2', '$dupelink3', '$dupelink4', '$dupetroublelink', '$dupehead1', '$dupehead2', '$dupehead3', '$dupehead4', '$dupetext5', '$dupeimg5', '$dupelink5', '$dupehead5', '$dupehits1', '$dupehits2', '$dupehits3', '$dupehits4', '$dupehits5', '$dupepicno', '$dupepicno2', '$dupepicno3', '$dupepicno4', '$dupepicno5')");
When trying to insert it all at the same time, it does not create a new row because theres some errors somewhere, so ive had to trial and error to find out which ones do work and which do not.
So im just wondering why some of the data will go in and some wont.
I also got it setup looking like:
$dupetrouble = $fetch->trouble;
$dupeheader = $fetch->header;
$dupeslogan = $fetch->slogan;
$dupeimg1 = "";
$dupetext1 = "";
$dupeimg2 = "";
$dupetext2 = "";
$dupeimg3 = "";
$dupetext3 = "";
$dupeimg4 = "";
$dupetext4 = "";
$dupefooter = $fetch->footer;
$dupedate = $fetch->date;
$dupelink1 = $fetch->link1;
$dupelink2 = $fetch->link2;
$dupelink3 = $fetch->link3;
$dupelink4 = $fetch->link4;
$dupetroublelink = $fetch->troublelink;
$dupehead1 = $fetch->head1;
$dupehead2 = $fetch->head2;
$dupehead3 = "";
$dupehead4 = $fetch->head4;
$dupetext5 = $fetch->text5;
$dupeimg5 = $fetch->img5;
$dupelink5 = $fetch->link5;
$dupehead5 = $fetch->head5;
$dupehits1 = "0";
$dupehits2 = "0";
$dupehits3 = "0";
$dupehits4 = "0";
$dupehits5 = "0";
$dupepicno = $fetch->picno;
$dupepicno2 = $fetch->picno2;
$dupepicno3 = $fetch->picno3;
$dupepicno4 = $fetch->picno4;
$dupepicno5 = $fetch->picno5;
So for the fields that i cant get the info to come from, ive replaced with "" and that works. So why is it some of the contents of the previous row cannot be inserted into a new one ?