Jesper Kampmann Jesper Kampmann - 1 year ago 45
PHP Question

Select all customers but not from current month

How can i get all customers, but not records that have signed up in CURRENT month? I thought this would work, but nope - what to do?

SELECT * FROM customers WHERE deleted = 0 AND (MONTH(created) != MONTH(NOW() AND YEAR(created) != YEAR(NOW())))

SELECT * FROM customers 
   WHERE (deleted = 0) AND  not (
         (MONTH(created) = MONTH(NOW()) AND 
         (YEAR(created) = YEAR(NOW()))