orderby for multiple fields doesn’ work correctly
-
Hi,
I am using this for sorting and displaying uploaded files.
$params = array ( 'where' => 'intranet-category.term_id = '.$categoryID, 'orderby' => 'intranet-year.meta_value DESC, t.post_title ASC', 'limit' => -1 ); $pods = pods('intranet_file', $params); if($pods->total() > 0) { ...
So output is:
2014 – Pokyn ?editele ?.4/2014 Směrnice…
2013 – Pokyn ?editele ?.2/2013 Slo?ení…
2013 – Pokyn ?editele ?.3/2013 P?edkládání…
2013 – Dodatek ?.1 k Pokynu…
2013 – Pokyn ?editele ?.1/2013 Adresy…
2012 – Pokyn ?editele ?.1/2012 Slo?ení…But files in bold are not properly sorted. It should be by year and than by title.
Like this:
2014 – Pokyn ?editele ?.4/2014 Směrnice…
2013 – Dodatek ?.1 k Pokynu…
2013 – Pokyn ?editele ?.1/2013 Adresy…
2013 – Pokyn ?editele ?.2/2013 Slo?ení…
2013 – Pokyn ?editele ?.3/2013 P?edkládání…
2012 – Pokyn ?editele ?.1/2012 Slo?ení…Can you please help me with that?
Thank you!
- The topic ‘orderby for multiple fields doesn’ work correctly’ is closed to new replies.