Thank you Massimo

--- On Tue, 8/11/09, mdipierro <mdipie...@cs.depaul.edu> wrote:

> From: mdipierro <mdipie...@cs.depaul.edu>
> Subject: [web2py:28376] Re: Help query
> To: "web2py-users" <web2py@googlegroups.com>
> Date: Tuesday, August 11, 2009, 8:04 PM
> 
> Here is is broken down into pieces:
> 
> a=db.llamados
> b=db.accountcode.with_alias('b')
> c=db.clientes.with_alias('c')
> query =
> (b.id_clientes==clte)&(a.dialstatus=='ANSWER')&
> (a.inicio>=desde)&(a.inicio<=hasta)
> left =
> (b.on(a.id_accountcode==b.id),c.on(b.id_clientes==c.id))
> rows = db(query).select
> (a.destino,a.answeredtime,a.inicio,a.fin,a.valor,left=left,orderby=~a.inicio)
> 
> 
> 
> 
> On Aug 11, 4:54 pm, FERNANDO VILLARROEL <fvillarr...@yahoo.com>
> wrote:
> > Dear all.
> >
> > How i can doing the following query for web2py:
> >
> >  select
> >        
> a.destino,a.answeredtime,a.inicio,a.fin,a.valor from
> llamados as a
> >  join
> >         accountcode as b on a.id_accountcode=b.id
> >  join
> >         clientes as c on b.id_clientes=c.id
> >
> >  where id_clientes = clte and a.dialstatus='ANSWER'
> and (a.inicio >=
> >
> > desde    and a.inicio <= hasta) order by a.inicio
> DESC
> >
> > I want not use executesql.
> >
> > Fernando
> > 
> 


      

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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