Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z petla w zapytaniu mysql, proste
P3A_MDF
post
Post #1





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 16.12.2004

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


Zawsze wyswietlalem rekordy z tablicy w ten sposob:
rekord1 <enter>
rekord2 <enter>
rekord3 <enter>
rekord4 <enter>
rekord5 <enter>
rekord6 <enter>

Ale teraz potrzebuje zrobic cos takiego:

rekord1 rekord2 rekord3 <enter>
rekord4 rekord5 rekord6 <enter>

Czyli np. po trzecim rekordzie enter badz nowy wiersz tabeli (<TR>)

Cos nie potrafie takiej petli zbudowac, prosze o pomoc.
Go to the top of the page
+Quote Post
Pigula
post
Post #2





Grupa: Zarejestrowani
Postów: 446
Pomógł: 0
Dołączył: 5.03.2005
Skąd: Lublin

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


modulo

  1. <?php
  2.  
  3. for ($i=1; $i<=ilosc_rekordow;$i++)
  4. {
  5. echo rekord;
  6. if ($i%== 0) echo 'n';
  7. }
  8.  
  9. ?>


tak mi sie wydaje ze pownno dzialac

Ten post edytował Pigula 23.05.2005, 19:06:15
Go to the top of the page
+Quote Post

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: 22.08.2025 - 16:29