connection.execute("UPDATE notifyTable set notified = 1 WHERE coinMarketValue < value AND notified = 0")
我的查询。我该如何检查是否已执行?
例如:
if query is True:
code
谢谢:)
答案 0 :(得分:0)
检查rowcount是否对您的案件有用。
答案 1 :(得分:-1)
考虑使用例外
success_flg = True
try:
connection.execute("UPDATE notifyTable set notified = 1 WHERE coinMarketValue < value AND notified = 0")
except:
success_flg = False