Hi Francesco,

Am Mon, 14 May 2007 12:44:46 -0000
schrieb cesco <[EMAIL PROTECTED]>:

> query = """SELECT id FROM my_table \
>                 WHERE my_table.some_id IN %s"""
> cursor.execute(query, [(1, 2, 3)])

why are you diving so deep?
can't you just use

myobjects = MyTable.objects.filter(some__in=(1,2,3)) ?

(I am assuming that your model is called MyTable and that the field
"some_id" is in fact a ForeignKey field called "some")

If you absolutely _have_to_ use the query/cursor code, then sorry, I
personally don't have a solution for that.

Martin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to