Query issue
Posted: Wed Nov 21, 2007 12:47 pm
My query keeps presenting this error:
Yet when i echo'd it.. it looked fine so i dont get why it wont work.
This my query:
What is wrong exactly ? Cos the OwnerID='{$_SESSION['Current_User']} I have used many times before and its only just now not allowed it =/
Code: Select all
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 'WHERE OwnerID='1'' at line 1This my query:
Code: Select all
$Update = "UPDATE restaurant SET TableStaffTotal = TableStaffTotal-$SellTableStaff WHERE OwnerID='{$_SESSION['Current_User']}'";
$result = mysql_query($Update) or die(mysql_error());