mam taki kod jest to fragment skryptu forum, mial on wyswietlac tematy przyklejone, ogloszenia, oraz zwykle zaleznie od wartosci pola status w bazie, a nic nie wyswietla. Moze zle zrobilem zagniezdzajac petle while w for ?
<?php
for( $i=0; $i>4; $i++ )
{
if( $i=1 )
{
$zapytanie=\"SELECT * FROM forum_c WHERE id_b=$_GET[id] AND nowy_temat='1' AND status='1'\";
$status=\"Ogłoszenie\";
}
elseif( $i=2 )
{
$zapytanie=\"SELECT * FROM forum_c WHERE id_b=$_GET[id] AND nowy_temat='1' AND status='2'\";
$status=\"Przyklejony\";
}
else
{
$zapytanie=\"SELECT * FROM forum_c WHERE id_b=$_GET[id] AND nowy_temat='1' AND (status='3' OR status='4')\";
$status=\"zwykly\";
}
{
//wyciety kod do statystyk
echo\"
<center>
<table class='forum_zwykle' width='750' height='28'>
<tr>
<td width='50' height='28'>img</td>
<td width='441' height='28'><div class='forum_nazwa_forum'><a href='./forum.php?mode=pokaz_posty&id=$forum_c[id]'>$forum_c[temat]</a></div></td>
<td width='55' align='center' height='28'>$status<a href=../include/pokaz_profil/pokaz_profil_gl.php?id=$users[id]>$users[login]</a></td>
<td width='55' align='center' height='28'>$ilosc_odpowiedzi</td>
<td width='55' align='center' height='28'>$forum_c[odslony]</td>
<td width='93' align='center' height='28'>$users4[id_]</td>
</tr>
</table>
</center>
\";
}
}
?>