[Catalyst] Order_by

Doran L. Barton fozz at iodynamics.com
Thu Mar 22 22:59:42 GMT 2007


Not long ago, Doran L. Barton proclaimed...
> This is really a DBIC question... but it's like this:
> 
>     my @books = $c->model('My::AppDB::Book')->search( 
>         { num_pages => { '>=', $pages }},
>         { order_by  => 'title'});
> 
> Basically, the order_by is the second argument to the search() function. 

Woops! I should have been more specific. The order_by key-value pair is an
*option* - one of several - that can be enclosed in a hash of options that
can be passed as the second parameter to the search() method.

Sorry I wasn't as clear the first go around.

-- 
fozz at iodynamics.com is Doran L. Barton, president/CTO, Iodynamics LLC
Iodynamics: IT and Web services by Linux/Open Source specialists
 "Dog for sale: eats anything and is fond of children."
    -- Classified ad in newspaper
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070322/9313d5d4/attachment.pgp


More information about the Catalyst mailing list