MySQLdb.string_literal

Carsten Haese carsten at uniqsys.com
Fri Nov 2 13:48:48 CET 2007


On Fri, 2007-11-02 at 12:24 +0000, gert wrote:
> I want to escape binary data so i can insert data into a blob

No, you don't want to escape binary data. You want to bind it to a
parametrized query:

http://informixdb.blogspot.com/2007/07/filling-in-blanks.html

Keep in mind, though, that MySQLdb uses %s as parameter markers instead
of the SQL standard question mark.

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list