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

bcurtu bcurtu at gmail.com
Fri Sep 26 06:30:50 EDT 2008


Pardon?

% instead of %s?

It doesn't work... :(

On 26 sep, 12:15, Wojtek Walczak <gmin... at bzt.bzt> wrote:
> 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 '%'.
> HTH.
>
> --
> Regards,
> Wojtek Walczak,http://tosh.pl/gminick/




More information about the Python-list mailing list