//********** Send email with old data record ************
global $conn,$strTableName;
$email="test@test.com";
$message="";
$subject="Sample subject";
// modify the following SQL query to select fields you like to send
$rs = db_query("select * from " . $strTableName ." where ". $where,$conn);
if($data=db_fetch_array($rs))
{
foreach($data as $field=>$value)
$message.= $field." : ".$value."\r\n";
runner_mail(array('to' => $email, 'subject' => $subject, 'body' => $message));
}
|