【发布时间】:2011-07-27 21:44:47
【问题描述】:
我写了一条指令来使用 2 个 id 从数据库中获取频率,如下所示:
cursor = db.cursor()
cursor.execute("select freq from matrix_brown where a_id in (%s) and b_id in (%s)",b_item_id,b_after_id)
b_freq=cursor.fetchone()
但我收到此错误:
cursor.execute("select freq from matrix_brown where a_id in (%s) and b_id in (%s)",b_before_id,b_item_id)
TypeError: execute() takes at most 3 arguments (4 given)
请帮帮我.. 谢谢你.. :)
【问题讨论】:
标签: python mysql mysql-python