I'm looking for a MySql query who returns last 6 months ago update data OR/AND, if the sum of results is less than 100, the next n rows to complete to 100.
The first part of the query is :
SELECT * FROM content, categories
WHERE categories.id = content.id AND lastUpdate > DATE_SUB(now(), INTERVAL 6 MONTH)
ORDER BY lastUpdate DESC, content.id DESC, content.title ASC
I don't find explanations to do this. Someone could help me ?
Aucun commentaire:
Enregistrer un commentaire