Re: cursors and raw sql

2008-12-04 Thread David Zhou
On Thu, Dec 4, 2008 at 3:56 AM, bcurtu <[EMAIL PROTECTED]> wrote: > i need to perform some Raw SQL queries in my django app. I read in the > doc (http://docs.djangoproject.com/en/dev/topics/db/sql/) I can do sth > like: ... > The question is... Do I have to close the cursor? Assuming it's

cursors and raw sql

2008-12-04 Thread bcurtu
Hi, i need to perform some Raw SQL queries in my django app. I read in the doc (http://docs.djangoproject.com/en/dev/topics/db/sql/) I can do sth like: def my_custom_sql(self): from django.db import connection cursor = connection.cursor() cursor.execute("SELECT foo FROM bar WHERE