这是PHP代码:MySQL的“插入” SQL语法错误问题
$stringquery = "INSERT INTO sikurim(name, title, desc, category, subcategory)
VALUES ('$contact', '$heading','$comments', '$catF', '$catS') ";
mysql_query($stringquery) or die(mysql_error());
,我得到的错误:
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 'desc, category, subcategory) VALUES ('jhjh', ' fffff','fffff', '2', '4')' at line 1
我找不到什么是错的代码,可以有人帮忙?
是的,但最好的肯定是改变列的名称。 –
,并且请确保您将适当的卫生设施应用于您的变量,如果您将它们插入到您的查询中! – knittl
现在工作,谢谢:) – Tom