Add this line to that code:
print dir(tms)
I think you'll find a method of the recordset that will give you the count. I
don't remember off of the top of my head. Why are you doing a direct SQL query
instead of using a queryset from your model?
Shawn
--
You received this message because you
On Mon, Dec 21, 2009 at 9:02 AM, Bobby Roberts wrote:
> Looking at this code:
>
> newsqlcmd="select title,author from booklist"
> cursor=connection.cursor()
> cursor.execute (newsqlcmd)
> tms=cursor.fetchall() #this is the actual recordset being pushed
> back to the template
>
>
>
Looking at this code:
newsqlcmd="select title,author from booklist"
cursor=connection.cursor()
cursor.execute (newsqlcmd)
tms=cursor.fetchall() #this is the actual recordset being pushed
back to the template
how can I get the record count? I could loop through and
incre
3 matches
Mail list logo