[BangPypers] help using mysqldb

Vijay Ramachandran vijay750 at gmail.com
Wed Dec 24 13:42:27 CET 2008


On Thu, Dec 18, 2008 at 11:31 AM, <bangpypers-request at python.org> wrote:

> From: "Sidharth Kuruvila" <sidharth.kuruvila at gmail.com>
>
> Do this instead
>
> cur.execute('select * from Employee where id in (%s)', ids.join(', '));
>
>
I would need to co-erce my id into a string rep to do this.  I guess that's
ok?
Also, will the escaping be taken care of if the type of id was a string?

thanks,
Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20081224/2ed322be/attachment.htm>


More information about the BangPypers mailing list