Copy to list for completeness
-----Original Message-----
From: Matthews Simon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 26, 2003 8:40 AM
To: Hicks, Matthew
Subject: RE: [Templates] Plugin::DBI with nested queries
The problem here is that some DBI drivers don't allow you to
have more than
one statement open on a single DBI connection. The answer is
to create 2
DBI connections and use one for the outer loop and one for the inner.
[% USE c1 = DBI(...) %]
[% USE c2 = DBI(...) %]
[% FOREACH master = c1.query("SELECT id,* ...") %]
...
[% FOREACH detail =
c2.query("SELECT * ... where detail.masterid = '$master.id'") %]
...
[% END %]
[% END %]
Hope this helps
S
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates