【发布时间】:2013-11-06 03:17:46
【问题描述】:
我在我的网站上运行这个:
$PlaceOrder = " Insert INTO Order VALUES ( '$CustomerID' , '$ItemID' , '$Quantity' , '$Date' ) ";
$result = mysql_query ($PlaceOrder);
if (!$result)
{
die('Invalid query: ' . mysql_error());
}
但是当我这样做时,我不断收到以下错误消息:
Invalid query: 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 VALUES ( '3' , '1' , '12' , '11/05/2013' )' at line 1
我现在真的不知道该怎么做,我尝试指定列,但也没有用。我对这一切都很陌生,我正在根据手册中的内容执行此操作。
【问题讨论】:
-
我需要问一下;这是您的实际代码
Insert INTO Table VALUES吗?您是否使用Table作为您的表名? -
什么是表结构?如果您的日期列是日期,则应为 2013-11-05
-
先是
Table,现在是Order下定决心。