|
Posted by Eric Culus on 10/11/05 10:24
>> $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?
No, the class is build in such a way that it is not necessary to use
"$result = "
>> $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") ?
This is a query request inside the first loop... simply pulling new data
from the db when a matching variable is found
"Mark Rees" <mrees@itsagoodprice.com> wrote in message
news:79u2f.11794$Nv6.2702@newsfe6-win.ntli.net...
>> <?
>>
>> $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....
>>
>> ?>
>
>
Navigation:
[Reply to this message]
|