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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.