Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP] Resource id #6 przy pobieraniu danych
pjamalia
post 24.09.2011, 21:11:02
Post #1





Grupa: Zarejestrowani
Postów: 77
Pomógł: 0
Dołączył: 1.11.2009

Ostrzeżenie: (0%)
-----


Witam,

Pobieram sobie dane w ten sposób. Funkcja pobierająca dane znajduje się w klasie w osobnym pliku.
Samo zapytanie działa bez problemów. W samej funkcji dane są pobierane. Funkcja echo mysql_num_rows($result); zwraca 1 row, tyle pownna.
Nie wiem co to za błąd. Po stronie skryptu wyświetlającego wywala mi Resource id#6. Poproszę o małą pomoc...



  1. $result = mysql_query($querry) or die("Error DB querry. Error: " . mysql_error());
  2. while ($this->row = mysql_fetch_array($result))
  3. {
  4. $this->id_adv[$counter++] = $this->row['ID_'];
  5. $this->object_name[$counter++] = $this->row['_NAME'];
  6. $this->object_type[$counter++] = $this->row['_TYPE'];
  7. $this->region[$counter++] = $this->row['REGION'];
  8. $this->city[$counter++] = $this->row['CITY'];
  9. $this->area[$counter++] = $this->row['AREA'];
  10. $this->street[$counter++] = $this->row['STREET'];
  11. $this->house_nr[$counter++] = $this->row['HOUSE_NR'];
  12. $this->adv_phone1[$counter++] = $this->row['PHONE1'];
  13. $this->adv_phone2[$counter++] = $this->row['PHONE2'];
  14. $this->adv_fax[$counter++] = $this->row['FAX'];
  15. $this->adv_email[$counter++] = $this->row['EMAIL'];
  16. $this->website[$counter++] = $this->row['WEBSITE'];
  17. $this->self_description[$counter++] = $this->row['SELF_'];
  18.  
  19. $this->availibility[$counter++] = $this->row['AVAILABILITY'];
  20. $this->rooms[$counter++] = $this->row['ROOMS'];
  21. $this->price_person_from[$counter++] = $this->row['_PERSON_FROM'];
  22. $this->price_person_to[$counter++] = $this->row['_PERSON_TO'];
  23. $this->night_places[$counter++] = $this->row['_PLACES'];
  24.  
  25. $this->bathroom[$counter++] = $this->row['g'];
  26. $this->tv[$counter++] = $this->row['d'];
  27. $this->sat[$counter++] = $this->row['s'];
  28. $this->radio[$counter++] = $this->row['f'];
  29. $this->beach_tools[$counter++] = $this->row['_w'];
  30. $this->fridge[$counter++] = $this->row['g'];
  31. $this->kettle[$counter++] = $this->row['j'];
  32. $this->kichen_anex[$counter++] = $thisrow['d_ANEX'];
  33. $counter++;
  34.  
  35. echo mysql_num_rows($result);
  36. }
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 - 13:53