Re: [SQLObject] GROUP BY query

2007-12-17 Thread Oleg Broytmann
On Mon, Dec 17, 2007 at 02:50:33PM -0300, Guillermo Heizenreder wrote: In [195]: for person in results: .: print person .: .: ('Juan',) In [196]: 1. Which may be the mistake? Why do you think you have a mistake? Did you expect person to be a string

Re: [SQLObject] GROUP BY query

2006-10-18 Thread Olivier Ravard
Oleg Broytmann wrote: On Tue, Oct 17, 2006 at 07:41:51PM +0200, Olivier Ravard wrote: from sqlobject.sqlbuilder import Select select = Select([Item.q.name], groupBy=name) results = connection.query(connection.sqlrepr(select)) Thanks. It was what I am searching... But when I

Re: [SQLObject] GROUP BY query

2006-10-17 Thread Oleg Broytmann
On Tue, Oct 17, 2006 at 06:26:53PM +0200, Olivier Ravard wrote: I use SQLObject for my project and I want to use a GROUP BY query. But the folowing line does not work : Item.select(groupBy='name') Think for a minute about the underlying SQL. Item.select() runs the query SELECT * FROM

Re: [SQLObject] GROUP BY query

2006-10-17 Thread Oleg Broytmann
On Tue, Oct 17, 2006 at 07:41:51PM +0200, Olivier Ravard wrote: from sqlobject.sqlbuilder import Select select = Select([Item.q.name], groupBy=name) results = connection.query(connection.sqlrepr(select)) Thanks. It was what I am searching... But when I run this part of code, it