mysql select last week posts count
by Prakash[ Edit ] 2013-08-03 12:49:45
In mysql to select the last 7 days posts or its count the following query is used.
select count(*) from posts where date > DATE_SUB(NOW(), INTERVAL 7 DAY)
In the above query
date is the user defined column specifying the date.