Jump to content

error in sql syntax


lmcgr44

Recommended Posts

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();
   }

Link to comment
https://forums.phpfreaks.com/topic/227702-error-in-sql-syntax/
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.