|
Posted by Mark Rees on 10/10/05 16:38
> <?
>
> $db->open() or die($db->error());
> $db->query("myquery") or die($db->error());
Don't know what's going on in your $db class, but do you have to assign the
result set to something?
e.g. $result=$db->query("Start another query") 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());
Does this call to $db overwrite the result set you are looping on - the one
you initialise with query("myquery") ?
> 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]
|