On Jan 26, 4:25 pm, Chris Nelson <chris.nel...@sixnet.com> wrote:
> On Jan 24, 5:15 pm, Chris Nelson <chris.nel...@sixnet.com> wrote:
> > On 01/24/2012 05:07 PM, osimons wrote:
> ...
> but gives an example of LIKE but not IN.  Is there some support for
> IN?  There best I can come up with is something like:
>
>   cursor.execute("SELECT * from table WHERE username in (%s)" +
> MyDbList(users)
>
> where MyDbList is something like:
>
>    def MyDbList(db, pyList):
>       myList = [db.quote(e) for e in pyList]
>       return ','.join(myList)
>
> Is there a cleaner way?

I can't even do it that way because I'm working with 0.11 and the DB
API doesn't have quote().  Is there a way to determine the string
quoting character in 0.11?

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to trac-dev@googlegroups.com.
To unsubscribe from this group, send email to 
trac-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to