Re: mail () breaks loop



>> $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@xxxxxxxxxxxxxxxxx> wrote in message
news:79u2f.11794$Nv6.2702@xxxxxxxxxxxxxxxxxxxxxxx
>> <?
>>
>> $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....
>>
>> ?>
>
>


.



Relevant Pages

  • Re: looping in c language
    ... # a pattern of plume dispersion in an unstable atmosphere, in which the plume undergoes marked vertical oscillations as it is alternately affected by rising convective plumes and the subsiding motions between the plumes. ... Looping can also occur as the result of a skipped stitch. ... hackers "leap frog" or loop through several computer systems before finally going into the system they actually intend to attack. ... the recordings were made sequentially on a roll and later manually synched to picture. ...
    (comp.programming)
  • Re: Loop to run macro each tow
    ... It is a lot of looping to make sense of! ... Sheet named Base ... I would like if possible a loop on the sheet bases with macro Ci below. ... Dim A As Integer, B As Integer, C As Integer ...
    (microsoft.public.excel.programming)
  • Re: Is using range() in for loops really Pythonic?
    ... I suddenly saw the for loop in a new ... main intended usage is for looping. ... Python leans toward minimalism. ... looping needs; while-loops cover everything else. ...
    (comp.lang.python)
  • Re: Looping
    ... What I do sometimes in difficult cases is the looping loop: ... for(int looping = 1; looping;) ... your looping loop doesn't translate a while. ... This also solves the problem that "break" inside the switch does not ...
    (comp.lang.c)
  • Re: Store multiple values in a variable
    ... Joe wrote: ... populated based on the criteria in the procedure but the thing is since ... You are about to overwrite an existing table: ... LOOP -- if overlap exists ...
    (comp.databases.oracle.tools)