lmcgr44 Posted February 15, 2011 Share Posted February 15, 2011 hello when i run the script i get 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 'title` ,`prep` ,`cook` ,`makes` ,`ingredients` ,`recipe` ,`notes`)VALUES ('lmcgr' at line 1 this is the part of the code it is telling me to check andy ideas why its tlling me? function AddRecipe($user,$Pub,$title,$prep,$cook,$make,$ingr,$desc, $note){ if(!TRACK_VISITORS) return; $q = "INSERT INTO recipies (`user` ,`Pub ,`title` ,`prep` ,`cook` ,`makes` ,`ingredients` ,`recipe` ,`notes`)VALUES ('$user', '$Pub', '$title', 'prep', 'cook','$make', '$ingr', '$desc', '$note');"; mysql_query($q, $this->connection) or die(mysql_error()); $this->calcNumActiveGuests(); } Quote Link to comment Share on other sites More sharing options...
btherl Posted February 15, 2011 Share Posted February 15, 2011 You forgot a "`" after Pub. Quote Link to comment Share on other sites More sharing options...
phppaper Posted February 15, 2011 Share Posted February 15, 2011 as well as ` to ' Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.