cursor execute 使用args参数返回为空

#34 · closed · 0 comments

View on GitHub ↗

tqlihuiqi

code with (yield self.pool.Connection()) as conn: with conn.cursor() as cursor: rows = yield cursor.execute(sql, tuple(args)) data = cursor.fetchall() raise Return((rows, data)) 执行返回结果为 0, () 但如果将sql格式化好,不使用args则运行正常。 code sql = sql % tuple(args) with (yield self.pool.Connection()) as conn: with conn.cursor() as cursor: rows = yield cursor.execute(sql) data = cursor.fetchall() raise Return((rows, data))

Comments