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@derp.com', '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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.