I have a table with two fields: dh_premium_expires
and score
.
dh_premium_expires - the date / time the user's premium will expire.
score - in-game user score.
On my site I have a list where I can list these users, and I am currently ordering as follows:
ORDER BY dh_premium_expires DESC, score DESC;
I want premium users to come first and then the ones with the highest score. That way it's working, but there's a problem, premium users with more premium time are getting to the top and I wanted it to stay that way:
Premier users with the highest score. Primitive users. Users with higher score.
For this I would have to create a variable setting 1 for who is premium (dh_premium_expires> today's date) and 0 for who is not or has already expired. That would be correct I think.
How do I do this in MySQL?