Page 1 of 1

Searching for different time periods...

Posted: Mon Jun 02, 2008 6:09 pm
by jkashu
This will return signups today... How do I modify the last line to return results for this week, this month, and this year??

Code: Select all

SELECT 
SUM(amount) AS amountR,
COUNT(amount) AS salesR
FROM signups
WHERE affiliateID = '$affiliateID' AND userID IN (SELECT
                       userID
                       FROM users
                       WHERE signupdate = CURDATE())

Thanks!