Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Tablice wyjete z mysql
Raven1122
post
Post #1





Grupa: Zarejestrowani
Postów: 369
Pomógł: 2
Dołączył: 1.11.2010

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


witam, mam pytanie. wyjalem z mysql wartosc i zamienilem ja na tablice i teraz mam pytanie. uzylem do tego nastepujacego kodu:
$row = mysql_fetch_array($result);
oczywiscie wczesniej byla zmienna result
i teraz mam pytanie:
jak bedzie wygladala taka tablica?
wiem ze to bedzie $row['name'], ale jak wyciagac kolejne rekordy?
nie chce uzywac petli while tylko recznie wstawiac.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Raven1122
post
Post #2





Grupa: Zarejestrowani
Postów: 369
Pomógł: 2
Dołączył: 1.11.2010

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


  1. <dl><dt>MENU</dt>
  2. <dd><marquee direction="left"><a href="index.php?id=5"><font color="red" style="letter-spacing:10px; text-shadow:#ff0000 2px 0 20px;"><blink>SŁUCHAJ ONLINE&nbsp;&nbsp;&nbsp;&nbsp;SŁUCHAJ ONLINE&nbsp;&nbsp;&nbsp;&nbsp;SŁUCHAJ ONLINE&nbsp;&nbsp;&nbsp;&nbsp;SŁUCHAJ ONLINE</blink></font></a></marquee></dd>
  3. <dd><a href="index.php?id=6">Ramówka</a></dd>
  4. <dd><a href="index.php?id=8">Pozdrowienia</a></dd>
  5. <dd><a href="index.php?id=7">Utwór Na życzenie</a></dd>
  6. <dd><a href="index.php?id=12">Blogi</a></dd>
  7. <dd><a href="index.php?id=2">Prezenterzy</a></dd>
  8. <dd><a href="index.php?id=4">Kontakt</a></dd>
  9. <dd><a href="index.php?id=9">Nasza Historia</a></dd>
  10. <dd><a href="index.php?id=11">Rekrutacja</a></dd>
  11. <dd><a href="index.php?id=10">Sugestie</a></dd>
  12. <dd><a href="index.php?id=12">Reklama/Współpraca</a></dd>
  13. </dl>
  14.  
  15. <?php
  16. $connect = mysql_connect('lxxxxt', 'xxx', 'xxxx') or die(mysql_error());
  17. mysql_select_db(bassplay_web);
  18.  
  19. $sql = "SELECT * FROM pool_top10 ORDER BY glosy DESC";
  20. $result = mysql_query($sql) or die(mysql_error());
  21.  
  22. $query = mysql_query('SELECT name FROM pool_dj10');
  23.  
  24. ?>
  25.  
  26. <dl><dt style="margin-top:50px;">TOP 10</dt>
  27. <dd><font color="gold" style="font-size:28px; margin-left:8px;">1</font><font color="gold" style="margin-left:14px;"><?php echo mysql_result( $query, 0); ?></font> </dd>
  28. <dd><font color="silver" style="font-size:28px; margin-left:8px;">2</font><font color="silver" style="margin-left:14px;"> Lolita-Juli Garcon</font> </dd>
  29. <dd><font color="#b44702" style="font-size:28px; margin-left:8px;">3</font><font color="#b44702" style="margin-left:14px;"> Sak Noel-Loca People</font> </dd>
  30. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">4</font></b><font style="margin-left:14px;"> Nero-Giult</font></dd>
  31. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">5</font></b><font style="margin-left:14px;"> Dan Balan-Freedom</font></dd>
  32. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">6</font></b><font style="margin-left:14px;"> Andreea Banica-Love in Brasil 2010</font></dd>
  33. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">7</font></b><font style="margin-left:14px;"> Julissa Veloz-Take Control</font></dd>
  34. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">8</font></b><font style="margin-left:14px;"> Morris feat. Sonny Flame-Havana Lover</font></dd>
  35. <dd><b><font color="#a2a2a2" style="font-size:28px; margin-left:8px;">9</font></b><font style="margin-left:14px;"> David May-Superstar</font></dd>
  36. <dd><b><font color="#a2a2a2" style="font-size:28px;">10</font></b><font style="margin-left:6px;"> Dj Antoine vs ft. Kalenna-Welcome to St. Tropez</font></dd>
  37. </dl>
  38.  
  39.  


Ten post edytował Raven1122 5.09.2011, 16:46:08
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 - 21:23