De SQL-query is vrij eenvoudig en gaat als volgt
SELECT *, TIMESTAMPDIFF(day, Date, NOW()) FROM `your_table_name` WHERE TIMESTAMPDIFF(day, Date, NOW()) = 1;
Nu moet je de inhoud van het resultaat ophalen en in een string plaatsen
<?php
$sql = " SELECT *, TIMESTAMPDIFF(day, Date, NOW()) FROM `your_table_name` WHERE TIMESTAMPDIFF(day, Date, NOW()) = 1";
$query = mysql_query($query);
$emailBody = "";
while($row = mysql_fetch_assoc($query))
{
$emailBody .= "Name: ".$row['Name']."; Address: ".$row['Address']."; Data: ".$row['Data']."; Email: ".$row['email']." \n";
}
mail("[email protected]", "Subject", $emailBody);
?>
Geniet ervan!