<分区>
它不断收到此 SQL 错误,但我非常确定查询中没有错误。我已经盯着它看了太久了。还有其他可能导致这种情况的原因吗?
INSERT INTO game_data (clue, image, answer, wrong, right) VALUES ('asdf', 'asdf', 'asdf', 'assdf', 'asdf')
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 'right) VALUES ('asdf', 'asdf', 'asdf', 'assdf', 'asdf')' at line 1
我已经用这个确切的代码运行了其他查询,只是换掉了变量,而且它有效。
为了更好的衡量,有生成这个的 php:
$sql = "INSERT INTO game_data (clue, image, answer, wrong, right) VALUES
('" . $clue . "', '" . $image . "', '" . $answer . "', '" . $wrong . "', '" . $right . "')";