此代码不会给出任何错误或异常,但它不会执行:
self.cur.execute('UPDATE roundshares SET shares = shares + 1, round = \'' + str(roundid) + '\', user_address = \'' + str(row[2]) + '\'')
但每当我手动查询此字符串时,与上面的代码输出相同:
UPDATE roundshares SET shares = shares + 1 WHERE round ='1'AND user_address ='1'
此查询有效,任何人都可以向我解释为什么这不起作用?