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

bcurtu bcurtu at gmail.com
Fri Sep 26 05:32:50 EDT 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