store binary files in mysql

Ivan Horvath i.horvath at alco.co.hu
Tue Oct 12 03:27:38 EDT 2004


Hi Dragos,

thank you very much it is working fine.

Dragos Chirila wrote:

> 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?
>>
>
>




More information about the Python-list mailing list