Correct, it will get you results.
The drawback is you are hitting the database twice, while a join requires
only one hit.
In nearly every case you want to minimize database hits for performance
reasons.
On Sunday, July 22, 2012 1:12:39 PM UTC-4, Alec Taylor wrote:
>
> Took another look, realised a join wasn't need for this sort of
> information, so rewrote the function thus:
>
> def d():
> group = db(db.group_of_events.group_name ==
> request.args(0)).select() or redirect(URL('', 'groups'))
> events = db(db.event.group_id == group[0].id).select()
> return dict(group=group, events=events)
>
--