[Tutor] Fetching dictionaries using MySQLdb

Jan Eden lists at janeden.org
Mon Aug 8 21:26:36 CEST 2005


Hi Danny,

Danny Yoo wrote on 08.08.2005:

>On Mon, 8 Aug 2005, Jan Eden wrote:
>
>>Is there a recommended way to receive the results of an SQL query
>>in the form I need? Or do I have to create a dictionary of
>>fieldname tuples which can be zipped with the query result tuple?
>
>
>Hi Jan,
>
>MySQLdb supports the concept of customized cursor types.  They have
>a particular cursor class that returns dictionary objects:

Great! I found the pydoc for MySQLdb a bit confusing and would probably have taken quite a while to figure that out - thanks a lot.

- Jan
--  
Any technology which is distinguishable from magic is insufficiently advanced.


More information about the Tutor mailing list