Ashish Sood Posted December 10, 2012 Share Posted December 10, 2012 Hi, I dont know why i am getting a error into my insert query i checked whole query but cant find the error. Parse error: syntax error, unexpected ';' in /var/www/html/checklist/project/main_validation.php on line 159 Please check my below insert query.. $sql = mysql_query("INSERT INTO sample (DATE,JOBNAME,TIME,INITIALS) VALUES ('$date','$amb','$amb_time','$amb_ini'), ('$date','$pro','$pro_time','$pro_ini'), ('$date','$arp','$arp_time','$arp_ini'), ('$date','$cir','$cir_time','$cir_ini'), ('$date','$prenite','$prinite_time','$prinite_ini'), ('$date','$bcl4','$bcl340_time','$bcl340_ini'), ('$date','$bcl5','$bcl350_time','$bcl350_ini'), ('$date','$bcl6','$bcl360_time']','$bcl360_ini''), ('$date','$bcl7','$bcl370_time','$bcl370_ini'), ('$date','$inv','$inv220_time','$inv220_ini'), ('$date','$sto','$sto_time','$sto_ini'), ('$date','$picking','$picking_time','$picking_ini'), ('$date','$arpnight','$arpnight_time','$arpnight_ini'), ('$date','$mstnight','$mstnight_time','$mstnight_ini'), ('$date','$salnight','$salnight_time','$salnight_ini'), ('$date','$arpamb','$arpamb_time','$arpamb_ini'), ('$date','$nreports','$nreports_time','$nreports_ini')" or die (mysql_error()); Thanks In Advance Link to comment Share on other sites More sharing options...
satishpoul Posted December 10, 2012 Share Posted December 10, 2012 in last line i think instead of ('$date','$nreports','$nreports_time','$nreports_ini')" or die (mysql_error());it should be('$date','$nreports','$nreports_time','$nreports_ini')") or die(mysql_error()); Link to comment Share on other sites More sharing options...
satishpoul Posted December 10, 2012 Share Posted December 10, 2012 $tmp = mysql_uery(" insert .... values (),()") or die(mysql_error()); Link to comment Share on other sites More sharing options...
Ashish Sood Posted December 10, 2012 Author Share Posted December 10, 2012 in last line i think instead of ('$date','$nreports','$nreports_time','$nreports_ini')" or die (mysql_error());it should be('$date','$nreports','$nreports_time','$nreports_ini')") or die(mysql_error()); Thanks For your reply my problem is being solved, Thanks A Lot 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now