there is something wrong with my query but I have no idea what the problem is.
Here are my queries:
$result=mysql_query("UPDATE user_info SET Money = '$newmoney' WHERE Username ='$user'");
$result=mysql_query("INSERT INTO order (username, amount, stock, company) VALUES
('$user','$amount','$stock','$symbol')");
When I run it the first query works, but the second doesn’t. There are now errors given.
Any help would be great, thank you.
orderis a reserved word. Quote it with backticks:Furthermore, notice that on the PHP manual page for the
mysql_query()function, it states in a big red box: