Reputation: 91
i want to order by views desc
then by id desc
i've tried
ORDER BY `id` DESC , `views` DESC
and
ORDER BY `views ` DESC , `id` DESC
it did not gave me the result i need
i want to get the most recent news by views
table news
id int(11)|views int(11)
any help please
Upvotes: 0
Views: 53
Reputation: 37233
then use the order views first and then id.
try this
ORDER BY `views` DESC ,`id` DESC
Upvotes: 1
Reputation: 1270181
Then put the variables in the right order in the clause:
ORDER BY `views` DESC, `id` DESC
Upvotes: 1