Just use one WHERE
and combine conditions with AND
:
c.execute("SELECT * FROM requests WHERE driverID=? AND accepted=?",
(sid_login.get(), False))
Also, instead of manually quoting False
, you could use parametrization and let sqlite3 do it for you.