Hi, i'm trying to update a mysql table with values, and i get this error:
Error: 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 StockID= 23' at line 1.
Here is my code.
$sql="UPDATE stock SET HDDType='$hddtype', HDDConnection='$hddconnection', HDDSize='$hddsize', Make='$make', Model='$model', Comments='$comments', Date='$date', WHERE StockID= $id";
And here is my echoed query:
UPDATE stock SET HDDType='internal', HDDConnection='ide', HDDSize='1000', Make='Hitachi', Model='HDT721010SLA361', Comments='', Date='05/08/11', WHERE StockID= 23
Thanks guys :)