Dictionary inserts into MySQL (each key in its own field)

Robin Haswell rob at digital-crocus.com
Fri Jan 27 10:35:52 CET 2006

On Fri, 27 Jan 2006 00:03:30 -0800, Derick van Niekerk wrote:

> I have found many posts that deal with writing a dictionary to MySQL in
> a blob field - which I can't imagine why anybody would want to do it.
> I want to write each element of a dictionary onto a db table. The keys
> would match the fieldnames. Is there something that would make this job
> easier? i.e. how do I write an entire dictionary into a db table as a
> row? I have an idea that it is something very simple - possibly even
> one line of code...
> -d-

Try looking at http://pear.php.net/db , in the documentation, see
DB::autoPrepare and DB::autoExecute.


More information about the Python-list mailing list