show us the query.
On Oct 13, 10:47 pm, Alex <[email protected]> wrote: > Hello, > > I have a query that does a select and COUNT on my model. I wish the > present the COUNT value of each row on the view but am having trouble > figuring out the syntax for doing this. > > I have a for loop, iterating through each row in the resultset and > tried to follow the example in the book, by using {{=row[count]}} but > to no avail. > > I took a look at the objects in the row, and noticed that an "_extra" > object is returned in the resultset. Looking at the keys in the > "_extra" dictionary, I do see the key based on my COUNT column: > > ie. COUNT(db.table_name.column) > > I tried to access the count value with {{=rows._extra.colName}}, but > still had no luck. Is there something obvious I am missing? > > Thanks! > > I have tried something like: > > {{for row in ranking:}} > <tr> > <td>{{=row.auth_user.first_name}} {{=row.auth_user.last_name}}</ > td> > <td>{{=row[count]}}</td> > </tr> > {{pass}}

