On Tue, 2007-03-20 at 14:30 +0100, Michele Beltrame wrote:
> while( my $artist = $rs->next) {
> my $cds = $artist->cds;
> while ( my $cd = $cds->next ) {
> print $cd->title . "\n\n";
> }
> }
Hi again Michele ...
I would like to improve upon your solution before we close the
discussion on the issue... Please feel free to correct me if I am wrong.
I dont think there is a necessity for the first 'while' loop because we
are just querying on a single artist ...
this piece of code below seems to work fine.
my $cds = $rs->first->cds;
while ( my $cd = $cds->next )
{
print $cd->title . "\n";
}
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/