Forum OpenACS Q&A: Response to Nested multiple tags

Collapse
Posted by Tilmann Singer on
In this case you should really do one query and use the "group" tag to avoid unnecessary queries, somehow like this:
db_multirow people people {
  select p.last_name, e.email from
  persons p join email_addresses e on p.person_id=e.person_id
  order by p.last_name
}
and in the adp:
<multiple id="people">

Name: @people.last_name@
Emails: <group column="last_name">@people.email@</group>
<p>
</multiple>

(this example is untested and propably buggy, but you get the idea)