I have the following MySQL query:
SELECT (COUNT(id) * 5) AS total FROM content WHERE author = 'newbtophp'
I also have a column called content_timestamp (which contains the UNIX timestamp of when the content was created).
The MySQL query is functioning fine, however I only want the COUNT(id) to consider a maximum of 3 content per day (so if the table content contains more then 3 rows of data WHERE the day (+ month + year) of the content_timestamp is the same then only consider the first 3 and disregard the rest) – this is where I believe the content_timestamp will become useful.
However I’m unsure on how to do this?
All help is greatly appreciated.
Will it work for you?
Update