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

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3694e-2c033.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3694e-2c033.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?