python 查询 mysql ,带参数错误

知行合一1 发布于 2017/05/16 10:33
阅读 157
收藏 0

==========
Traceback (most recent call last):
  File "D:\Users\Administrator\workspace\svnRecom\ItemCF2Mysql.py", line 61, in <module>
    counsu=queryCou()
  File "D:\Users\Administrator\workspace\svnRecom\ItemCF2Mysql.py", line 45, in queryCou
    rows = queryrcmd(sql)
  File "D:\Users\Administrator\workspace\svnRecom\ItemCF2Mysql.py", line 57, in queryrcmd
    conn.execute(sql)
  File "E:\ProgramData\Anaconda2\lib\site-packages\pymysql\cursors.py", line 166, in execute
    result = self._query(query)
  File "E:\ProgramData\Anaconda2\lib\site-packages\pymysql\cursors.py", line 322, in _query
    conn.query(q)
  File "E:\ProgramData\Anaconda2\lib\site-packages\pymysql\connections.py", line 855, in query
    self._execute_command(COMMAND.COM_QUERY, sql)
  File "E:\ProgramData\Anaconda2\lib\site-packages\pymysql\connections.py", line 1091, in _execute_command
    packet = prelude + sql[:packet_size-1]
TypeError: cannot concatenate 'str' and 'tuple' objects

加载中
返回顶部
顶部