Jump to content

syntax error


conan318

Recommended Posts

all was working in till i added the last 3 items into the query. lock,pri,high.

all 3 variables echo out the right value.

remove the last 3 works fine.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'lock,pri,high) VALUES ('tom@mydomain','tom','logo Design','add add'' at line 1

 

$result=mysql_query("INSERT INTO listing (email,listing_name,listing_type,listing_description,budget,ivn,link1,link2,link3,slide,slide2,slide3,slide4,slide5,slide6,expiredate,zip,lock,pri,high) VALUES ('$email','$listing_name','$dtype','$description','$budget','$inv2','$link1','$link2','$link3','$slide','$slide2','$slide3','$slide4','$slide5','$slide6','$newdate','$img','$lock','$pri','$high')") or die (mysql_error());

Link to comment
https://forums.phpfreaks.com/topic/256508-syntax-error/
Share on other sites

changed the table to invite and all is working now... notsure why it did like me using the word lock.

 

$result=mysql_query("INSERT INTO listing (email,listing_name,listing_type,listing_description,budget,ivn,link1,link2,link3,slide,slide2,slide3,slide4,slide5,slide6,expiredate,zip,pri,high,invite) VALUES ('$email','$listing_name','$dtype','$description','$budget','$inv2','$link1','$link2','$link3','$slide','$slide2','$slide3','$slide4','$slide5','$slide6','$newdate','$img','$pri','$high','$invite')") or die (mysql_error());

 

 

Link to comment
https://forums.phpfreaks.com/topic/256508-syntax-error/#findComment-1314934
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.