I'm trying to formulate what should be a simple query that will create a result set of ALL records from a table that have a date that is in the previous month...
Basically something like this one that I use that gets any records prior to the current week, only for the month...
UPDATE trans_earnings SET status = 'P' WHERE status = 'E' AND YEARWEEK(earned_date, 0) < YEARWEEK(NOW(), 0) AND abbrev = 'ABC'
This would be used in a script that is run once each month, so it would basically effect all records from the previous month.
Thanks in advance