Before i used datetime
for post created time from database,
SELECT MONTH(created)+1, count(*)
FROM post_comments
WHERE YEAR(created) = YEAR(CURDATE())
group by MONTH(created)
ORDER BY MONTH(created)
and now i am using unix timestamp
. How I need to make a change in the above code, to work it unix timestamp
.
Before the created time looks like this: 2018-04-28 09:03:02
and now the created time looks like this: 1524921263