You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought so too, but when I tried using express I get the following error: Argument 1 passed to Latitude\\QueryBuilder\\order() must be of the type string, object given
I can't find many examples of using express in situ, so I've gone off of the snippet here: fb0d2ff
$orderby_case = "ORDER BY CASE id \n";
foreach ($programme_ids as $id => $order)
{
$orderby_case .= "WHEN '$id' THEN $order \n";
}
$orderby_case .= "END, id";
$query->orderBy(express($orderby_case), 'DESC');
I'm looking to do something similar to this... https://stackoverflow.com/questions/6332043/sql-order-by-multiple-values-in-specific-order
Where I already know the specific order to apply before creating the query.
In raw sql this would be written like so...
The text was updated successfully, but these errors were encountered: