store binary files in mysql
Dragos Chirila
d.chirila at finsiel.ro
Tue Oct 12 05:55:45 EDT 2004
Hi
Use escape_string method from MySQLdb module.
Dragos
Ivan Horvath wrote:
> Dear All,
>
> i would like to store binary file contents to a mysql database in a
> mediumblob fields.
> i've got problem when there is a simple quote, double quot, backslash or
> NUL character in the file content, because these characters are
> acceptable by mysql only when there is an escape char. before it.
> do you know any solution, how can i replace these characters in order to
> import it to a mysql table?
>
--
Dragos Chirila
Programmer, Finsiel ROMANIA
44A, Ficusului St. - 71544 Bucharest
Tel: +40 21 2320193
Fax: +40 21 2329807
URL: http://www.finsiel.ro
Jabber: dragos at jabber.finsiel.ro
More information about the Python-list
mailing list