我得到這個錯誤:INSERT INTO錯誤的MySQL/PHP
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 'order (total, addy, cc) VALUES ('798' , '123 sadf' , '12124123')' at line 1
$total = addslashes(($_SESSION['total']));
$addy = addslashes(($_POST['addy']));
$cc = addslashes(($_POST['cc']));
echo "$total";
echo "$addy";
echo "$cc";
mysql_query("INSERT INTO order (total, addy, cc) VALUES ('$total' , '$addy' , '$cc')") or die(mysql_error());
我怎樣才能解決這個問題呢?
不要使用任何關鍵字或備用名稱字段或表名。重命名訂單。 – Karthik 2010-05-26 05:16:01