I am trying to run the following sql query:
select *
from fblikes
order by likes desc (select * from fblikes order by id asc limit 0,4)
it gives the following error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from fblikes order by id asc limit 0,4) LIMIT 0, 30' at line 1
what i want to achieve is that the query should select first 5 entries by 'id' (ascending) and out of those 5 it should order them by 'likes' (descending).
I am poor at nested queries. Any Help?