MySQLdb, blobs, and inserting
marut at my-deja.com
marut at my-deja.com
Wed Jan 12 16:59:57 EST 2000
I've searched python.org, deja news, and the MySQLdb docs without
finding any good examples of using INSERT.
Could someone post a few?
# file = mydoc.html
# Does file need quoting? I thought the DB 2.0
# removed the need for that...?
>>> c.execute(r"INSERT INTO items (story) VALUES (%s)" % file )
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "MySQLdb.py", line 153, in execute
File "MySQLdb.py", line 189, in _query
_mysql.OperationalError: (1064, 'You have an error in your SQL syntax
near \'<!DOCTYPE HTML PUBLIC "-//W3C
//DTD HTML 4.0 Transitional//EN" "http://www.w3.org\' at line 1')
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list