lundi 14 décembre 2015

single mysql query for choosing 25 records (9+16) using union all and based on 2 different conditions

I need to fetch 25 records using mysql out of which first 9 must be based on the descending order of likes count (chosen randomly) and balance 16 randomly from the remaining items (excluding 9, that are already filtered). Is it possible using a single mysql query. Any help will be appreciated.




Aucun commentaire:

Enregistrer un commentaire