Jesper Kampmann Jesper Kampmann - 5 months ago 8x
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()))