Mialem zaimplementowana metode getRow() ktora wygląda nastepująco :
<?php public function getRow() { } [php] Nastepnie wywoływałem wynik w ten sposob : [php] while($row = $rs->getRow()) { } ?>
Nastepnie aby zastapic metode getRow() zaimplementowalem interface iterator posiadający nastepujące metody :
<?php interface Iterator { public function valid(); } ?>
Ktore wyglądają tak :
<?php return $this->currentrow; } return $this->key; } public function valid() { return $this->valid(); } $this->valid = true; $this->key++; } else { $this->valid = false; } } $this->valid = true; $this->key = 0; } } else { $this->valid = false; } } ?>
Nastepnie aby wyswietlic wynik na ekranie uzylem zamiast petli while i funkcji getRow() petli foreach :
<?php foreach($rs as $row) { } ?>
No i niestety, gdy odpalilem plik index.php serwer apache przestal dzialac wywalajac komunikat windows "serwer http przestał dzialac", zrestartowałem serwer ale kolejna proba wyswietlila strone "przekroczony limit czasu połączeń"......jakim cudem taka implementacja moze zatrzymac prace serwera ?