[Catalyst] Sort - ORDER BY

Will Smith willbelair at yahoo.com
Tue Nov 8 20:28:51 CET 2005


thanks, i use DBI::RetrieveAll, which gave me error (could not find the sql)
then I use the DBI::Sweet , no error but the result is not right
 
use Class::DBI::Sweet;
...
$c->stash->{myartist} = cd::M::CDBI::Artist->retrieve_all( order_by => 'name' );
....
Then on my template I have:
[% WHILE (artist= myartist.next) %]
[% artist.name %]<br>
[% END %]
 
the result is not sorted. I just wonder where i am wrong.
 
Thanks

Jules Bean <jules at jellybean.co.uk> wrote:
Will Smith wrote:
> when I do the "retrieve_all" call, how can I use something like ORDER 
> BY column_name. I haven't seen this mentioned in Catalyst doc. Thanks 
> for all your help in the past and in the coming future.
> Regards

You won't find this in the Catalyst docs because it isn't part of 
catalyst. 'retrieve-all' is a Class::DBI method.

There are various CDBI extensions which give you more powerful queries. 
One is Class::DBI::Sweet, which you can find on CPAN.

Jules

_______________________________________________
Catalyst mailing list
Catalyst at lists.rawmode.org
http://lists.rawmode.org/mailman/listinfo/catalyst

		
---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20051108/d1fa28af/attachment.htm


More information about the Catalyst mailing list