I have a sql statement that returns no hits. For example, \'select * from TAB where 1 = 2\'.
\'select * from TAB where 1 = 2\'
I want to check how many rows are returned,
cu
I had issues with rowcount always returning -1 no matter what solution I tried.
I found the following a good replacement to check for a null result.
c.execute("SELECT * FROM users WHERE id=?", (id_num,)) row = c.fetchone() if row == None: print("There are no results for this query")