I can't comment for the rest of stuff, but the last zero means to return 
the first item in the list.  The select() call returns an SQLSet 
instance (which is an iterateable(sp?) type).  The [0] grabs the first 
SQLRow out of that set.

-tim

annet wrote:
> I have rebuilt the function from scratch:
>
> def byplace():
>  
> records=db((db.company.id==db.address.company)&(db.company.id==db.companyLOB.company))
> \
>     
> .select(db.company.companyName,db.company.ranking,db.address.streetName,db.companyLOB.lineOfBusiness,
> \
>     orderby=db.company.ranking|db.company.companyName)
>     return dict(records=SQLTABLE(records))
>
> That narrows my question down to the WHERE clause:
>
> WHERE address.cityname='Eindhoven' AND address.typeofaddress=1 AND
> companyLOB.lineOfBusiness=1.
>
>
> It seems to conflict with the join:
>
> db((db.company.id==db.address.company)&(db.company.id==db.companyLOB.company))
>
>
>
> Furthermore, while reading the manual I came across the following
> line:
>
> thispage=db.(db.page.id==request.args[0]).select() [0]
>
> and I wonder what the last [0] means.
>
>
> Annet.
>
>
>
>
>
>
> >
>   

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

begin:vcard
fn:Timothy Farrell
n:Farrell;Timothy
org:Statewide General Insurance Agency;IT
adr:;;4501 East 31st Street;Tulsa;OK;74135;US
email;internet:[EMAIL PROTECTED]
title:Computer Guy
tel;work:(918)492-1446
url:www.swgen.com
version:2.1
end:vcard

Reply via email to