我正在尝试将 mysql 5.1 与 python 2.6.6 一起使用,但出现以下错误。代码 :
query = "INSERT INTO present_list SET from='a', to='b'"
print query
cur.execute(query)
错误 :
Error 1064: 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 'from='a', to='b'' at line 1
有人能理解有什么问题吗?