MySQLdb & _mysql
mat
mathieu.rohon at bull.net
Tue Mar 25 11:10:27 EST 2003
hi evryone!
I'm using MySQLdb for my python program, but I've found a limitation
in its use.
in fact, I try to make a query which contains some python variables.
teh rpogram is the following:
s="/root/python/doc/%s" % (doc)
c.execute("""LOAD DATA INFILE s INTO TABLE table FIELD TERMINATED BY
"\t" """)
but it finds a SQL syntax error because of the s which is a variable
of my program.
I didn't find a way to introduce my variable in my SQL statement, so i
told myself that I should use the "_mysql" module instead of the
"MySQLdb" one.
but I didn't find any documentation on its use in Python programs.
does anyone can help me, I absolutly need to use some python variables
in my SQL query.
thanks
More information about the Python-list
mailing list