[Tutor] MySQLdb field type
Kent Johnson
kent37 at tds.net
Mon Aug 10 20:50:01 CEST 2009
On Mon, Aug 10, 2009 at 1:08 PM, Rick Pasotto<rick at niof.net> wrote:
> After executing a query that returns values, cursor.description contains
> a list of tuples, one tuple for each field. Each tuple has seven values
> consisting of (name,type_code,display_size,internal_size,precision,scale,null_ok).
>
> Where can I find a listing of what the various type_codes are? Do I need
> to experiment and make my own list?
See the section "Type Objects and Constructors" in the DB-API spec:
http://dinsdale.python.org/dev/peps/pep-0249/
Kent
More information about the Tutor
mailing list