DB Pool

2008-07-22 Thread bcurtu
Hi, I use MySQLdb lib to access my DB, because I want to opttimize my sql queries. The application I'm working on has quite a few traffic load, so I want to minimize the time of creating/destroying cursors: My typical code is sth like: cursor=con.cursor() cursor.execute(sql)

how to replace and string in a "SELECT ... IN ()"

2008-09-26 Thread bcurtu
Hi, I have a BIG problem with the next query: cursor.execute(""" SELECT titem.object_id, titem.tag_id FROM tagging_taggeditem titem WHERE titem.object_id IN (%s) """,( eid_list)) eid_list is suppossed to be a

Re: how to replace and string in a "SELECT ... IN ()"

2008-09-26 Thread bcurtu
Pardon? % instead of %s? It doesn't work... :( On 26 sep, 12:15, Wojtek Walczak <[EMAIL PROTECTED]> wrote: > On Fri, 26 Sep 2008 02:32:50 -0700 (PDT), bcurtu wrote: > > I have a BIG problem with the next query: > > >         cursor.execute(""" &g