Store python list in MySQL
John Bradbury
john_bradbury at ___cableinet.co.uk
Wed Jun 4 11:59:02 EDT 2003
I have tried
CR.execute("UPDATE STDPAGE SET content_s = %s,fldlist = %s where name =
'DATAENTRY'", (pagout,flds) )
where pagout is a string, flds is a python list and the database field
(fldlist) is defined as MEDIUMBLOB.
I get an SQL error.
I can convert the list to a string and it works, but I don't want to do
that. Is there a way of storing Python Lists/ Dictionaries etc as binary
using MySQLdb & then to be able to reload them as Lists etc?
Sorry if this has been answered before, but I can not find a response on
Google.
John Bradbury
More information about the Python-list
mailing list