I have 2 tables, one with 100,000 records of data and one with "not interested"
The table "businesses" has a "BusinessID | around 10 other info columns
the table "notinterested" has a "BusinessID" and a DateOfCall.
Currently i am filtering out the data by checking if, if exists in notinterested and the DateOfCall is less than 42 days then dont show it in the select. (code below).
SELECT * FROM businesses where PostCode like '" . $pcode . "%'
and BusinessType like '%$btype%'
and BusinessID NOT IN (SELECT BusinessID FROM telesales.notinterested WHERE NOW() BETWEEN DateOfCall and (DateOfCall + INTERVAL 42 DAY) )
and AppointmentDate is null
ORDER BY RAND() limit 100"
To answer your original question, you can run this query to update the added date field.
UPDATE businesses INNER JOIN (SELECT BusinessID, MAX(DateOfCall) maxdateofcall FROM telesales.notinterested WHERE NOW() BETWEEN DateOfCall AND (DateOfCall + INTERVAL 42 DAY) GROUP BY BusinessID) recentnotinterested ON businesses.BusinessID = recentnotinterested.BusinessID SET businesses.notinterested = recentnotinterested.maxdateofcall;