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

bcurtu bcurtu at gmail.com
Fri Sep 26 11:32:50 CEST 2008


Hi,

I have a BIIIIIG 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 list of ids = [1,5,9]

How can I make it work?

Thanks



More information about the Python-list mailing list