[Dbix-class] order by desc

Ash Berlin ash at cpan.org
Wed Dec 6 16:53:31 GMT 2006


Ivan.Georgiev at uboc.com wrote:
> how do u specify "order by desc" i.e. :
> 
> $schema->resultset('table')->search({ order_by => 'field' } );
> 
> and then how do u specify DESCending order ?
> 
> 
> ******************************************************************************
> This communication (including any attachments) may contain privileged or
> confidential information intended for a specific individual and purpose, 
> and is protected by law.  If you are not the intended recipient, you should
> delete this communication and/or shred the materials and any attachments and
> are hereby notified that any disclosure, copying, or distribution of this
> communication, or the taking of any action based on it, is strictly prohibited.
> 
> Thank you.
> 
> 
> _______________________________________________
> 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/dbix-class@lists.rawmode.org/

{ order_by => 'field desc'}

or

{ order_by => \'`field` desc'}

if you have quoting enabled (and are using MySQL - adjust quotes for 
your DB if not)



More information about the Dbix-class mailing list