Order by multiple columns

From ClassDBI

Revision as of 07:11, 21 December 2008 by EdwardSabol (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 my @ints = AppSys::BusinessHours->search( providerid => $provider_id, {order_by => 'intdow'});

I wish to add a second sort criteria, how can I do this?

---

You simply add whatever you need to your order_by string:

 { order_by => 'intdow, other_column DESC, yet_another_col' }

This string is passed straight through as SQL, so you can make it as complex as you like.

Personal tools