Reply to Re: mail () breaks loop

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация