Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problem z wywalniem odpowiednich danych, z bazy, w odpowiedni sposób
fiszol
post
Post #1





Grupa: Zarejestrowani
Postów: 453
Pomógł: 16
Dołączył: 25.05.2004
Skąd: Gorzów Wlkp.

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


skrypt:
  1. <?php
  2. $dbconnect=mysql_connect(&#092;"$dbhost\",\"$dbuser\",\"$dbpasswd\");
  3. $selelctdb=mysql_select_db(&#092;"$dbname\",$dbconnect);
  4. $listalbums=(&#092;" SELECT artist, album, year, genre, bitrate, size, filetype
  5. FROM audio
  6. ORDER BY artist, year ASC
  7. LIMIT 50 &#092;");
  8. $runquery= mysql_query($listalbums);
  9.  
  10. $getlist = mysql_fetch_assoc($runquery);
  11. $artist  = $getlist['artist'];
  12. $album = $getlist['album'];
  13. $year  = $getlist['year'];
  14. $genre = $getlist['genre'];
  15. $bitrate = $getlist['bitrate'];
  16. $size  = $getlist['size'];
  17. $filetype = $getlist['filetype'];
  18.  
  19. for($i=0;$i<mysql_num_rows($runquery);++$i)
  20. {
  21. if ($i < 50 )
  22. echo ($i+1), $artist , &#092;"&nbsp;\", $album, \"&nbsp;\", $year, \"&nbsp;\", $genre, \"&nbsp;\", $bitrate, \"&nbsp;\", $size, \"&nbsp;\", $filetype, \"<br>\";
  23. }
  24.  
  25. ?>


Wywala mi w kółko tylko pierwszy wpis z tabeli
Cytat
1Amon Amarth Versus The World 2000 Melodic Death Metal 224 90 0
2Amon Amarth Versus The World 2000 Melodic Death Metal 224 90 0
3Amon Amarth Versus The World 2000 Melodic Death Metal 224 90 0
4Amon Amarth Versus The World 2000 Melodic Death Metal 224 90 0
itd...

a chciałbym aby wywalał wpisy kolejno, co powinienem zmienić ?

pozdrawiam,
fiszol

Ten post edytował fiszol 6.04.2005, 09:28:46
Go to the top of the page
+Quote Post

Posty w temacie


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: 8.10.2025 - 16:51