MySQLdb & _mysql

mat mathieu.rohon at bull.net
Wed Mar 26 04:34:20 EST 2003


> 
> The bug is not in  the MySQL stuff but in the second line of your code...
> You should try (merge following in 1 line) ...
> 
> c.execute("""LOAD DATA INFILE %s INTO TABLE table FIELD TERMINATED BY "\t"
> """ % s)
> 
> HTH
> 
> Tip :  always "print" the python generated SQL statements that raise MySQL
> exceptions. This (generally) shows the SQL error like yours.
> 
> --Gilles

thanks for your answer Gilles.

it works with your syntax. I didn't think to try the python syntax to
insert a python variable in a string, I though that the SQL query
wasn't a string like others.
but in fact it is.


I hope I won't have to post any question...

thanks, mat




More information about the Python-list mailing list