|
Posted by Eric Culus on 10/07/05 15:36
Hope,
This' shorter...
<?
$db->open() or die($db->error());
$db->query("myquery") or die($db->error());
$i = 1;
while ($row=$db->fetcharray()) {
output db data
if (($myMaintenanceDate >= $mydateBeginMonth) && ($myMaintenanceDate <
$mydateHalfMonth)) {
$db->query("Start another query") or die($db->error());
while ($row2=$db->fetcharray()) {
$productNaam = $row2[0];
$productVersie = $row2[1];
$productType = $row2[2];
}
Etc... more queries until all data recovered
//mail
$subject = "mysubject";
$message = "mynessage";
$sendto = "myemail";
// send email
if ($distrmailok == "1") {
$sendto = $distrimail;
mail($sendto, $subject, $message);
}
if ($reselmailok == "1") {
$sendto = $sendto.", ".$dreselmail;
mail($sendto, $subject, $message);
}
$sendto = $sendto.", ".$endusmail;
mail($sendto, $subject, $message);
}
}
loop until next matching record found....
?>
[Back to original message]
|