Syntax Error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
$var
Forum Contributor
Posts: 317
Joined: Thu Aug 18, 2005 8:30 pm
Location: Toronto

Syntax Error

Post by $var »

You have an error in your SQL syntax near ' Meal_CID = 1' at line 1

Code: Select all

$sql2 = "SELECT * FROM meals WHERE Meal_Num = 2 , Meal_CID = ".$memcity;
Can anyone see why I am getting an error from this? Let me know if I need to post more.
duk
Forum Contributor
Posts: 199
Joined: Wed May 19, 2004 8:45 am
Location: London

Post by duk »

like this ??

Code: Select all

$sql2 = "SELECT * FROM meals WHERE Meal_Num ='2' AND Meal_CID = '$memcity'";
Post Reply