[Catalyst] generic db table list

Cory Watson jheephat at gmail.com
Fri Jun 2 14:53:53 CEST 2006


On 6/2/06, Fernan Aguero <fernan at iib.unsam.edu.ar> wrote:
<snip>
> This is not working for me ... maybe I'm wrongly guessing
> that rs.next() returns a hash?
>
> The following doesn't print anything:
>
> [% FOREACH row in rs.next() %]
> [% FOREACH column in row.keys %]
>         [% column %] [% row.$column %]
> [% END %]
> [% END %]

ResultSet's next method returns objects.

To get the columns you would want to do this:

[% FOREACH row in rs.next %]
 [% FOREACH column in row.columns %]
  [% column %]: [% row.$column %]
 [% END %]
[% END %]

-- 
Cory 'G' Watson
http://www.onemogin.com



More information about the Catalyst mailing list