Jump to content

Help With Reminder Script


derekshull

Recommended Posts

$query = 'SELECT * FROM needs WHERE completiondate = DATE_ADD(CURDATE(), INTERVAL 2 DAY)';
$result = mysql_query($query);
while ($rows = mysql_fetch_array($result)) {

mail ('[email protected]', 'Subject', 'Body');

}

 

for starters there should have been an _ between DATE and SUB. But then DATE_SUB was wrong. I'm needing the script to see if its two days away and remind me two days in advance. So instead of DATE_SUB you need DATE_ADD.

 

Jessica put me on the right path though. Thanks for teaching me Jessica. And thanks for your help Barand!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.