Re: how do you get recordcount?

2009-12-21 Thread Shawn Milochik
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

Re: how do you get recordcount?

2009-12-21 Thread Jason Beaudoin
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 > > >

how do you get recordcount?

2009-12-21 Thread Bobby Roberts
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