Skip to content
Advertisement

Python Mysql Queary not returning results

I have a DB and when I query a table I get 67 results. The SQL is:

I try to connect to the DB, and I get no connection errors.

It prints out -1 for rowcount. The connection to the DB appears to be working, the SQL is a simple query…

Advertisement

Answer

  • Try adding cursor.fetchall() before the print(cursor.rowcount)
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement