为了账号安全,请及时绑定邮箱和手机立即绑定

python 查询 mysql ,带参数错误

python 查询 mysql ,带参数错误

翻翻过去那场雪 2018-03-22 15:23:24
==========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
查看完整描述

1 回答

?
蝴蝶不菲

TA贡献1810条经验 获得超4个赞

="+str(SupplierId)

查看完整回答
反对 回复 2018-07-12
  • 1 回答
  • 0 关注
  • 403 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信