Python mysql operation query prompt not enough arguments for format string

python mysql operation query prompt not enough arguments for format string
Code:

sql_insert ="""select * from sj where expect >= %s and expect <= %s;"""
cur.execute(sql_insert,(90))

this is why

Mar.03,2021

(90 code 90)


there are two% s in the sql string, so you need to pass two values

.
Menu