MySQLdb - parameterised SQL - how to see resulting SQL ?

Ben Finney bignose+hates-spam at benfinney.id.au
Wed May 17 22:22:54 EDT 2006


shearichard at gmail.com writes:

> ... i would be interested in seeing what the actual SQL used by the
> .execute looks like after the replacements have been done. Is there a
> way of doing this ?

I also think this would be a very useful feature for enabling logging,
debugging, and other introspection. It surely is possible for the code
to present that information (it must construct the final SQL statement
to pass to the database engine), but I can't see a way to get at it
with the current DB API.

-- 
 \          "Better not take a dog on the space shuttle, because if he |
  `\   sticks his head out when you're coming home his face might burn |
_o__)                                             up."  -- Jack Handey |
Ben Finney




More information about the Python-list mailing list