【发布时间】:2013-08-23 03:21:55
【问题描述】:
我有这个问题:
some_id = 1
cursor.execute('
SELECT "Indicator"."indicator"
FROM "Indicator"
WHERE "Indicator"."some_id" = %s;', some_id)
我收到以下错误:
TypeError: 'int' object does not support indexing
some_id 是一个 int 但我想选择 some_id = 1 的指标(或我决定放入变量中的任何 #)。
【问题讨论】:
标签: python sql postgresql