Hello,

I am constructing raw query which looks like the following:
"SELECT * FROM some_table  WHERE id IN (1,3,5);"

So inside my view i write:
entities = Entity.objects.raw("""
SELECT * FROM some_table  WHERE id IN (%s);
""", [ids_list])

How should i correctly pass the argument ? Because i keep getting errors no 
matter how i try.


p.s. - In reality my query is much more complex, i have simplified it just 
to explain the question

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/40d474d3-5582-448e-9727-4f5f457c1767%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to