Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] OOP Problem z pętla, jw
miras
post 7.11.2013, 20:33:40
Post #1





Grupa: Zarejestrowani
Postów: 1 004
Pomógł: 9
Dołączył: 18.01.2011
Skąd: Siedlce

Ostrzeżenie: (30%)
XX---


Witam, dodałem do pętli jeszcze jeden warunek, żeby ją "zabić" w momencie, w którym to będzie potrzebne jednak mam błąd:

  1. : Call to a member function fetch() on a non-object in




i kod:


  1. $this->res=1;
  2. $this->check=1;
  3. while($row = $this->result->fetch() && $this->check==1) {
  4.  
  5. if($row['result']==1 && $this->res==1) {
  6. $this->res = $this->$row['result'];
  7. $this->result=1;
  8. } elseif($row['result']==0) {
  9. $this->result=0;
  10. $this->check=0;
  11. } else {
  12. $this->result=3;
  13. $this->check=0;
  14. }
  15.  
  16. }


dodam, że jak usunę ten dodatkowy warunek pętli to jest ok..


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 19:56