我不断收到此错误,无法找出问题所在。任何帮助,将不胜感激。谢谢。
sql -"INSERT INTO practices (order,name,url) VALUES ('1','Business & Corporate Law','business-corporate-law')"
错误:1064You 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,name,url) VALUES ('1','Business & Corporate Law','business-corporate-law')' at line 1
这是php:
$sql = "INSERT INTO ".$table." (".$cols.") VALUES (".$vals.")";
$result = mysql_query($sql);
if(!$result){die('Error: ' . mysql_errno() . mysql_error());}
$table 为“practices”,$cols 为“order,name,url”,$vals 为“'1','Business & Corporate Law','business-corporate-law'”