Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Błąd z pobieraniem z bazy
licha
post
Post #1





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 7.12.2010

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


Po raz kolejny php mnie pokonało i chyba po raz kolejny ta sama rzecz a mianowicie chodzi mi o pobieranie z bazy i nie wiem czemu nie działa
zapytanie poprawne w phpmyadmin sie to co chcę wyszukuje a tu nie umi !
mój kod to :
  1. require('conn.php');
  2. $trenmiej = mysql_query("SELECT `id` FROM `wyscigi` WHERE `miejsce` = '1' and `sesja` = '1' and `gp` = '1'");
  3. while ($trenmiejsce = mysql_fetch_array($trenmiej, MYSQL_NUM)) {
  4. }
  5. $trenm=$trenmiejsce[0];
  6.  
  7. print("$trenm");


Ten post edytował licha 31.03.2012, 13:05:55
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
licha
post
Post #2





Grupa: Zarejestrowani
Postów: 135
Pomógł: 0
Dołączył: 7.12.2010

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


trochę się chyba nie zrozumieliśmy wklejam całą tabelę :

  1. echo "<table>";
  2. echo "<tr>";
  3. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> LP </td>
  4. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> Nazwa Gracza </td>
  5. <td width=\"200\" height=\"20\" background=\"/dok.png\"> Team </td>
  6. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> Czas </td>";
  7. echo "</tr>";
  8. echo "<tr>";
  9. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 1 </td>
  10. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $remiejsce </td>
  11. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams1 </td>
  12. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas1 </td>";
  13. echo "</tr>";
  14. echo "<tr>";
  15. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 2 </td>
  16. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce2 </td>
  17. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams2 </td>
  18. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas2 </td>";
  19. echo "</tr>";
  20. echo "<tr>";
  21. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 3 </td>
  22. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce3 </td>
  23. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams3 </td>
  24. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas3 </td>";
  25. echo "</tr>";
  26. echo "<tr>";
  27. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 4 </td>
  28. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce4 </td>
  29. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams4 </td>
  30. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas4 </td>";
  31. echo "</tr>";
  32. echo "<tr>";
  33. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 5 </td>
  34. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce5 </td>
  35. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams5 </td>
  36. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas5 </td>";
  37. echo "</tr>";
  38. echo "<tr>";
  39. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 6 </td>
  40. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce6 </td>
  41. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams6 </td>
  42. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas6 </td>";
  43. echo "</tr>";
  44. echo "<tr>";
  45. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 7 </td>
  46. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce7 </td>
  47. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams7 </td>
  48. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas7 </td>";
  49. echo "</tr>";
  50. echo "<tr>";
  51. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 8 </td>
  52. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce8 </td>
  53. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams8 </td>
  54. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas8 </td>";
  55. echo "</tr>";
  56. echo "<tr>";
  57. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 9 </td>
  58. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce9 </td>
  59. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams9 </td>
  60. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas9 </td>";
  61. echo "</tr>";
  62. echo "<tr>";
  63. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 10 </td>
  64. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce10 </td>
  65. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams10 </td>
  66. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas10 </td>";
  67. echo "</tr>";
  68. echo "<tr>";
  69. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 11 </td>
  70. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce11 </td>
  71. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams11 </td>
  72. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas11 </td>";
  73. echo "</tr>";
  74. echo "<tr>";
  75. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 12 </td>
  76. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce12 </td>
  77. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams12 </td>
  78. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas12 </td>";
  79. echo "</tr>";
  80. echo "<tr>";
  81. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 13 </td>
  82. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce13 </td>
  83. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams13 </td>
  84. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas13 </td>";
  85. echo "</tr>";
  86. echo "<tr>";
  87. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 14 </td>
  88. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce14 </td>
  89. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams14 </td>
  90. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas14 </td>";
  91. echo "</tr>";
  92. echo "<tr>";
  93. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 15 </td>
  94. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce15 </td>
  95. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams15 </td>
  96. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas15 </td>";
  97. echo "</tr>";
  98. echo "<tr>";
  99. echo " <td width=\"200\" height=\"20\" background=\"/dok.png\"> 16 </td>
  100. <td width=\"200\" height=\"20\" background=\"/dok1.png\"> $trenmiejsce16 </td>
  101. <td width=\"200\" height=\"20\" background=\"/dok.png\"> $teams16 </td>
  102. <td width=\"200\" height=\"20\" background=\"/dok2.png\"> $trenczas16 </td>";
  103. echo "</tr>";
  104. echo "</table>";
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: 13.10.2025 - 19:19