Consider a particular SQL query in the form
cursor.execute(string, array)
Where string is some string containing '%s'
and array is some array satisfying len(array) == string.count("%s")
, not necessarily containing only strings.
For example:
cursor.execute("INSERT INTO tablename(col_one, col_two, col_three) VALUES (%s,%s,%s)",("text", 123, datetime.time(12,0)))
When I run this, I get an unhelpful error message about 'You have an error in your SQL syntax...' and then a partial text of the query. However, to debug this, I want to know the full text of the query.
When the query cursor.execute(string, array)
is run, what is the actual text of the query the the cursor executes?