xstatic Posted September 15, 2007 Share Posted September 15, 2007 Hi! Pretty new php user here, so bear with me. I have a site with a subscription feature and it registers the date the subscription starts in the field "date_added" I am wanting to create a script that will send an email reminding them of their need to renew when the subscription ends. Here is the query I came up with. I think I need help with the way I am formatting the date stuff in the WHERE clause. Basically I am trying to bring up their account if the current date is exactly one year ahead of the date added (without respect to the time information.) SELECT a.Email , u.fname , c.date_added FROM ptpl_accounts AS a LEFT JOIN ptpl_couponsubscription AS c ON c.user_id = a.ID LEFT JOIN ptpl_users AS u ON c.user_id = u.ID WHERE ADDDATE(c.date_added, INTERVAL 1 YEAR) = CURDATE() Thanks for any help!! Link to comment https://forums.phpfreaks.com/topic/69436-date-question/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.