首页  >  问答  >  正文

python mysql插入语句 返回1064

回溯(最近一次调用最后一次):
文件“python_mysql.py”,第 78 行,在

雷雷

文件“python_mysql.py”,第 17 行,在 cb_model_add 中

雷雷

文件“build/bdist.linux-x86_64/egg/MySQLdb/cursors.py”,第262行,在executemany中
文件“build/bdist.linux-x86_64/egg/MySQLdb/cursors.py”,第354行,在_query中
文件“build/bdist.linux-x86_64/egg/MySQLdb/cursors.py”,第 318 行,在 _do_query
_mysql_exceptions.ProgrammingError: (1064, "您的 SQL 语法有错误;请检查与您的 SQL 语法相对应的手册MySQL 服务器版本,用于在第 2 行的 ':code)' 附近使用正确的语法")

sql语句如下:
sql="insert into test1 (code)values (:code)"

雷雷
代言代言2675 天前836

全部回复(1)我来回复

  • 仅有的幸福

    仅有的幸福2017-06-22 11:53:34

    雷雷

    回复
    0
  • 取消回复