02-13-2008, 02:41 PM
|
#4 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 30
Thanks: 21
|
Quote:
Originally Posted by Salathe
SQL Code:
SELECT DATE_FORMAT(FROM_UNIXTIME(sup_date), '%m-%d-%Y') AS sdate, COUNT(id) AS scount FROM users WHERE -- post date must be between NOW and 30 DAYS ago sup_date <= NOW() AND sup_date >= DATE_SUB(NOW(), INTERVAL 30 DAY) GROUP BY sdate
|
I had to change it a lil bit to:
WHERE sup_date <= UNIX_TIMESTAMP(NOW())
AND sup_date >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 DAY))
but it works great Salathe. much thanks. you've been very helpful
__________________
one outstanding employee does more and costs less than two adequate performers.
|
|
|
|