Terrific, thank you !

On Thu, Jan 15, 2009 at 4:08 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:

>
> You can use as but only to rename tables.
>
> You need to do this the web2py way:
>
> counter=db.tickets.estado.count()
> estados=db(db.tickets.estado==db.estados.id).select
> (couner,db.estados.nombre,groupby=db.estados.nombre)
>
> for row in rows: print row.estados.nombre, row._extra[counter]
>
> Massimo
>
> On Jan 15, 10:22 am, apaterno <apate...@gmail.com> wrote:
> > Hi, I'm in a verry simple situation here with web2py
> >
> > estados=db(db.tickets.estado==db.estados.id).select('count
> > (tickets.estado) AS counter', db.estados.nombre,
> > groupby=db.estados.nombre)
> >
> > I'm trying to get the column name counter using the AS keyword query,
> > the query works perfect but I got:
> >
> > "count(tickets.estado) AS counter", as the COLUMN name, and I need to
> > get "counter".
> >
> > Is there any change I could get/use the "AS" keyword  ? I'm using
> > Mysql and It works perfect on mysql prompt.
> >
> > Thanks in advance, and I'm sorry for my bad english.
> >
>


-- 
Hector Augusto Paterno

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to