Python Database Objects (PDO) 1.2.0 Released
Geoff Howland
ghowland at lupineNO.SPAMgames.com
Tue Nov 18 12:58:12 EST 2003
On Mon, 17 Nov 2003 05:20:29 -0500, "Jon Franz" <jfranz at neurokode.com>
wrote:
>A Resultset is actually very different from a cursor - The first and
>most blatant difference being that with a Resultset, you get column
>access by name.
>
>With a DBAPI cursor, you create the cursor first, then perform an
>execute on the cursor, then do a fetchXXX (depending upon
>if you want one row at a time or many, or all). The data returned
>is separate from the cursor, and is a sequence of sequences.
I havent looked at the other DBAPI implementations lately, but with
MySQLdb you can set the cursor type to DictCursor, and then you get
back a sequence of dictionaries with the field names as the dict keys.
-Geoff Howland
http://ludumdare.com/
More information about the Python-list
mailing list