Dave Hodgkinson mentioned the following:

| However, if I nest this:
| 
| [% FOREACH tour = DBI.query( "SELECT * FROM tour_name ORDER BY tour_name_id DESC" ) 
|%]
| <H3>[% tour.tour_name_id %] : [% tour.tour_name %]</H3>
| 
| [% tdi = tour.tour_name_id %]
| [% FOREACH td =  DBI.query( "SELECT * FROM tour_date WHERE tour_date.tour_name_id = 
|$tdi ORDER BY tourdate ASC")%]
| [% td.tourdate %]
| [% END %]
| [% END %]
| 
| I end up with only _two_ sets:
| 
| 
| <H3>3 : <A NAME="Purple">Deep Purple UK Tour, 2002</A></H3>
| 
| 2002-02-06
| 2002-02-07
| 
| <H3>2 : <A NAME="york">"An evening with Ian Paice and Pete York"</A></H3>
| 
| 2001-12-02
| 2001-12-03
| 
| Is the first result set getting crapped on? Any alternative
| approaches?

I've had this problem too. I 'fixed' it by using two DBI handles which
works but isn't ideal if you have Apache::DBI running because you end up
with twice as many persistent connections kept open. :-(

I recently encroached on PostgreSQL's default concurrent connection limit
for some reason because of this, so I wouldn't mind knowing how to nest
the queries inside each other too...

Matt
-- 
"Phase plasma rifle in a forty-watt range?"
"Only what you see on the shelves, buddy."




Reply via email to