不知道是什么问题。 你能帮忙吗?
cur = conn.cursor()
sql = "select count(*) from sbox_trig where date > CURDATE() and name ='bw109nocd%2Ezip'"
cur.execute(sql)
Exception Type: TypeError
Exception Value: not enough arguments for format string
请您参考如下方法:
将 % 百分号加倍:
sql = "select count(*) from sbox_trig where date > CURDATE() and name ='bw109nocd%%2Ezip'"
%2E 部分被解释为 string formatter for a floating point number否则。
