I need my SQL query to search multiple columns, this is what I have so far:
cur.execute("SELECT name, unit, phone1, phone2 FROM rdata WHERE lower(unit) LIKE lower(?) OR REPLACE(lower(name), ' ', '') LIKE REPLACE(lower(?), ' ', '')", [z.get(),])
I've read as much documentation as I can but it still isn't working.
The error I get is:
sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 2, and there are 1 supplied.
Ok I figured it out thanks to your help, I added searching by phone numbers and did this instead.