Im using the following select statement in generating a list of my users and create an email who have expired. I need some way (and help) to update the records a.ID returned with todays date where the ids reminder_date1 = '0000-00-00'..
does that make any sense. here is my select statement which works a treat. i just need to know how to update the same records (a.id) that are returned.
SELECT user_ID, user_name, a.ID, emailAddress, Title, expiration,
TO_DAYS( expiration ) - TO_DAYS( NOW( ) )
AS Days
FROM default_listingsDB a, default_UserDB b
WHERE (TO_DAYS( expiration ) - TO_DAYS( NOW( ) ) =10
OR
TO_DAYS( expiration ) - TO_DAYS( NOW( ) ) =5
OR TO_DAYS( expiration ) - TO_DAYS( NOW( ) ) =1
OR TO_DAYS( expiration ) - TO_DAYS( NOW( ) ) <=0)
AND user_ID = b.ID
AND reminder_date1 = '0000-00-00'
AND reminder_date2 = '0000-00-00'
AND reminder_date3 = '0000-00-00'
so how do i update the same results with todays date in any of my reminder dates.
help greatly appreciated, im stuck... :eek:
thanks very much