(1-2/2)
Yeah try this:
1 YourModel::all(array("order" => "FIELD(field_name, '3','1','2')"))
To cover something so obscure as this mysql function is incredibly good. I'm astounded at how awesome this library is.
Thank you for all the hard work.
(1-2/2)
June 27 2010
April 16, 2013
Subject: Order By Field
In MySQL, if you want to apply a custom sort order to your results, you can use something like
Is this possible in phpar?