› MySQL 5.5 Community Server
› MySQL 5.6 Community Server
› Percona Configuration Wizard
› XtraBackup 搭建主从复制
Great Sites on MySQL
› Percona
› MySQL Performance Blog
› Severalnines
推荐管理工具
› Sequel Pro
› phpMyAdmin
推荐书目
› MySQL Cookbook
MySQL 相关项目
› MariaDB
› Drizzle
参考文档
› http://mysql-python.sourceforge.net/MySQLdb.html
o618
V2EX  ›  MySQL

在线求助 mysql 的问题

  •  
  •   o618 · Feb 15, 2014 · 3689 views
    This topic created in 4607 days ago, the information mentioned may be changed or developed.
    程序运行报错,请问如何解决:

    File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
    ProgrammingError: (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 ''updated': None, 'created': datetime.datetime(2014, 2, 15, 13, 7, 7), 'up_vote':' at line 1")
    3 replies  •  1970-01-01 08:00:00 +08:00
    shiny
        1
    shiny  
    PRO
       Feb 15, 2014
    你的SQL语法有问题,看上去是没有正确生成SQL字符串导致的。
    你可以把SQL打印出来看看。
    VYSE
        2
    VYSE  
       Feb 15, 2014
    sql里怎么会有这个?
    'updated': None, 'created': datetime.datetime(2014, 2, 15, 13, 7, 7), 'up_vote':
    直接str(dict)传进去了?
    fatpa
        3
    fatpa  
       Feb 16, 2014
    之前遇到过,好像是调用的方式错了,print 整句 sql 语句会更清楚的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2726 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 08:07 · PVG 16:07 · LAX 01:07 · JFK 04:07
    ♥ Do have faith in what you're doing.