You can just do len(rows)

On Aug 18, 6:21 am, fishwebby <[email protected]> wrote:
> Hi, I'm trying to get the number of rows returned by a query, so I can
> display "No rows found" in the view if none are returned, but I can't
> seem to find a way to do it - my query code is
>
> rows = db().select(db.course.id, db.course.title, orderby =
> db.course.title)
>
> Is there something like rows.count or rows.length (these didn't work
> when I tried them)?
>
> Many thanks
> Dave

Reply via email to