On 12/19/2010 09:45 PM, Andy wrote:
I need  to execute some SQL queries involving joins and it seems like
custom SQL is the way to go.

I presume you already tried out to do your JOIN queries using the Django ORM?

A couple of  questions:

1) In the doc  (http://docs.djangoproject.com/en/1.2/topics/db/sql/
#executing-custom-sql-directly) there's an example:
cursor.execute("SELECT foo FROM bar WHERE baz = %s", [self.baz])
What is the "self.baz" argument? What does it do?

I think it's a typo. There's no `self` in the whole code snippet; the function doesn't seem to be a method because it does not take `self` argument.

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

Reply via email to