MySQLdb & _mysql
Gilles Lenfant
glenfant at NOSPAM.bigfoot.com
Tue Mar 25 11:52:17 EST 2003
"mat" <mathieu.rohon at bull.net> a écrit dans le message de news:
a6b6f195.0303250810.3ef92252 at posting.google.com...
> hi evryone!
>
[...]
>
>
> s="/root/python/doc/%s" % (doc)
> c.execute("""LOAD DATA INFILE s INTO TABLE table FIELD TERMINATED BY
> "\t" """)
>
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
More information about the Python-list
mailing list