Started to rework this. Changed to an inner join (I believe!) as suggested.
rows=db(db.data.provider==db.providers.id).select(db.data.lon,
db.data.lat, db.providers.name)
Chris
On Mon, Sep 12, 2011 at 9:54 PM, Chris Rowson
wrote:
> Thank you both. I shall revisit, replace with a join and pu
Thank you both. I shall revisit, replace with a join and put the logic
into the controller rather than the view :-)
Chris
Also, if you need JSON, check
out http://web2py.com/book/default/chapter/09#Rendering-Rows.
Anthony
On Monday, September 12, 2011 4:27:08 PM UTC-4, leftcase wrote:
>
> {{for i,row in enumerate(rows):}}{{if not i==0:}},{{pass}}
> { lat: {{=row.lat}}, lng: {{=row.lon}}, name: "{{=row.provider.name}}"
> }
> {{pass}}
>
>
> As you can see,
4 matches
Mail list logo