> From: "Shipley, Rob" <[EMAIL PROTECTED]>
> I am attempting to use DBI in a template to return a message if 
> there are no
> records returned. The query works OK if there are records, but if 
> there are
> no returned records it doesn't display the message "There are no 
> records".Any ideas on how to make this work? I have tried both 
> loop.count and
> loop.size:
> [% reports = DBI.prepare('SELECT tblInvAll.Address, 
> tblInvAll.UtilizationFROM tblInvAll;') %]
> [% FOREACH report = reports.execute() %]
>               [% IF loop.count == 0 %]
<snip />

>From the docs, looks like you want "report.size"; give that a try.

Doug Gorley | [EMAIL PROTECTED]





_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to