Monday, April 30, 2012

executing raw sql

I'm trying to execute some raw sql. I found some code that did this:

from django.db import connection
cursor = connection.cursor()
data = cursor.fetchall()

But the cursor.execute(sql) is blowing up with:

'Cursor' object has no attribute '_last_executed'

What is the best or proper way for me to execute my raw sql?

You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment