对于我的生活,我无法得到这个插入查询的工作。PHP/MySQL插入查询
mysql_connect("**host**", "**username**", "**password**") or error("Could not connect: ".mysql_error());
mysql_select_db("**db_name**");
$db = mysql_query("INSERT INTO `pass_reset` (id,status,key,email) VALUES ('','0','$key','$email')");
它返回此错误:
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 'key,email) VALUES ('','0','','')' at line 1
有人能帮助我吗?我通过这个简单的查询从字面上拉我的头发。
这是一个'key'word,你可以说。哈哈。哈。我现在要走了。 –
+1击败我。 –
@Shef,我倾向于总是重新选中我的所有字段/表名,以解决很多未知问题! – LouwHopley