I am stuck with a problem in MySQL. I want to get the count of records between two date-time entries.
I have a column in my table named 'created' having the
May be with:
SELECT count(*) FROM `table` where created_at>='2011-03-17 06:42:10' and created_at<='2011-03-17 06:42:50';
SELECT count(*) FROM `table` where created_at between '2011-03-17 06:42:10' and '2011-03-17 06:42:50';
You can change the datetime as per your need. May be use
now() to get the desired dates.