I'm using mysql.connector and Python 3.7.
For SQL queries, I use this method:
cursor.execute("INSERT INTO table VALUES (%s, %s, %s)", (var1, var2, var3))
The thing is... when I want to print or debug the entire sql query, I can't get the values instead of the %s (I know the whole point is that you can't).
How do you guys do to debug this, then?
Thanks.
print("INSERT INTO table VALUES (%s, %s, %s)" % (var1, var2, var3))work?