MySQLdb warnings ... what caused them?

vivek kumar gupt_vive at hotmail.com
Tue May 13 10:34:31 EDT 2003


>Shouldn't your format string be: (%d, %s, %s)?
>
>Dave

If you use the tuple and """query""" format like:
cursor.execute("""select * from whatever where xyz=%s and 
abc=%s""",(anint,anfloat))

In this case the DBI module takes care of the data types itself. I didn't 
know this method until Gerhard Hearing enlightened me.

Regards
Vivek

_________________________________________________________________
What is SARS? Find out! http://server1.msn.co.in/completecoverage/sars/ Be 
informed.






More information about the Python-list mailing list