+----[ Brian Kirkbride <[EMAIL PROTECTED]> (03.Jan.2007 17:16):
|
[snipped]
| >The problem is that the resultset is empty when I try to
| >iterate over it the second time.
| >
| >So far the only way I've found to make this work is
| >to do N separate searches, fill N stash elements, et cetera
| >
| >$rs1 = $model->search( ... ); $c->stash->{rs1} = $rs1;
| >$rs2 = $model->search( ... ); $c->stash->{rs2} = $rs2;
| >...
| >
| >[% WHILE ( it = rs1.next() ) -%] ...
| >[% WHILE ( it = rs2.next() ) -%] ...
[snipped]
| You want rs.reset() between the iterations IIRC.
|
+----]
Thanks to all who replied. rs.reset() did it. It completely
escaped me when I read the Resultset.pm POD.
Fernan
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/