I have a feed of articles which are currently ranked by "votes" in the SQL query. I would like to factor in the amount of time since it was published in order to give more weight to recent articles.
SELECT *
FROM articles
WHERE date >= DATE_SUB(NOW(),INTERVAL 24 HOUR)
ORDER BY (votes * (720/#####)) DESC
LIMIT 100
What can I put into place of "#####" to return the amount of time (in minutes) since the article was published?
Therefore, an article with a vote of 1 that was published 10 minutes ago, would equal 72 (1 * 720/10) ...
and rank below an article with a vote of 10 but published 60 minutes ago, equaling 120 (10 * 720/60)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…