MySQLdb, blobs, and inserting

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Mon Feb 22 22:14:42 EST 2010


In message <mailman.45.1266790507.4577.python-list at python.org>, Dennis Lee 
Bieber wrote:

> Besides, the approved method of interacting with MySQLdb would use:
> 
> c.execute("insert into items (story) values (%s)",
> (file.read(), ) )
> 
> which lets the adapter properly escape any dangerous characters in the
> data, then wrap it with any needed quotes.

There are so many situations this cannot deal with...

<http://www.codecodex.com/wiki/Useful_MySQL_Routines>



More information about the Python-list mailing list