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

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Fri Sep 26 12:48:53 CEST 2008


Wojtek Walczak a écrit :
> On Fri, 26 Sep 2008 02:32:50 -0700 (PDT), bcurtu wrote:
> 
>> 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))
>                      ^
> It should rather be '%'.

Please avoid such clueless advices and read the doc of the python db-api.




More information about the Python-list mailing list