Wuu Posted December 23, 2013 Report Share Posted December 23, 2013 order by case when t1.title like "%'.$packet.'%" then 1 when t1.description like "%'.$packet.'%" then 2 when t2.post like "%'.$packet.'%" then 3 end order by case when t1.title like "%'.$packet.'%" && t1.start_date desc then 1 when t1.description like "%'.$packet.'%" then 2 when t2.post like "%'.$packet.'%" then 3 end Būtībā, kā sakārtot pēc like un timestampa vienlaicīgi. Quote Link to comment Share on other sites More sharing options...
l27 Posted December 23, 2013 Report Share Posted December 23, 2013 order by case when t1.title like "%'.$packet.'%" then 1 when t1.description like "%'.$packet.'%" then 2 when t2.post like "%'.$packet.'%" then 3 end, t1.start_date desc Quote Link to comment Share on other sites More sharing options...
Wuu Posted December 23, 2013 Author Report Share Posted December 23, 2013 Paldies! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.