我得到这个错误: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