MySQLdb, escaping values

дамјан г. mk at net.mail.penguinista
Wed May 7 11:00:56 EDT 2003


> 
> I have noticed a bug before where integers were not properly escaped in
> my version of mysqldb (or else I'm missing something obvious).  For
> example, both
> 
>   c.execute('select * from image where pid=%d', (1234,))
>   c.execute('select * from image where pid=%d', 1234)
> 
> generate the exception

because there's no %d substitution in mysqldb or any other DB adapters.
There's only the %s substitution.

-- 
Дамјан                                  (jabberID:damjan at bagra.net.mk)

Beware of he who would deny you access to information,
for in his heart, he dreams himself your master




More information about the Python-list mailing list