Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Pobieranie kolejnych rekordów z bazy
kuli95
post
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 8.07.2012

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


Witam. Mam problem, w bazie dodane mam 3 rekordy a ponizszy kod nie działa tak jak powinien
  1. <?php
  2. include('/config.php');
  3.  
  4. $query = "SELECT * FROM `panel`;";
  5. $sql = mysql_query($query);
  6. if ($sql)
  7. {
  8. $pages[] = mysql_fetch_array($sql);
  9. var_dump($pages);
  10. }
  11. ?>


a funkcja var_dump($pages) zwraca tylko jeden rekord:

  1. array (size=1)
  2. 0 =>
  3. array (size=6)
  4. 0 => string '1' (length=1)
  5. 'id' => string '1' (length=1)
  6. 1 => string 'asdf' (length=4)
  7. 'name' => string 'asdf' (length=4)
  8. 2 => string '3igrub' (length=6)
  9. 'parameter' => string '3igru
Go to the top of the page
+Quote Post

Posty w temacie
- kuli95   [MySQL][PHP]Pobieranie kolejnych rekordów z bazy   20.02.2013, 22:05:22
- - _Borys_   [PHP] pobierz, plaintext while($row = mysql_fe...   20.02.2013, 22:14:28
- - kuli95   dziękuję   20.02.2013, 22:47:12


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

 



RSS Aktualny czas: 9.10.2025 - 03:20