Parašė ozzWANTED· 2008 Vas. 9 12:02:36
#9
Prašom ;):
$uzklausa = mysql_query("SELECT komanda1, rezultatas1, rezultatas2, komanda2 from ".$db_prefix."rezultatai order by id");
if (dbrows($uzklausa)) {
echo "<table width='100%'>\n";
echo "<tr>
<td class='tbl1'><b>Komanda</b></td>
<td class='tbl1'><b>Rezultatas</b></td>
<td class='tbl1'><b>Rezultatas</b></td>
<td class='tbl1'><b>Komanda</b></td>
</tr>
</table>\n";
tablebreak();
$i = 1;
while ($data = dbarray($uzklausa)) {
$i = $i+1;
$tbl = $i%2 == 0 ? "class='tbl2'" : "class='tbl1'";
echo "<table width='100%'>
<tr>
<td $tbl>".$data['komanda1']."</td>
<td $tbl>".$data['rezultatas1']."</td>
<td $tbl>".$data['rezultatas2']."</td>
<td $tbl>".$data['komanda2']."</td>
</tr>
</table>\n";
tablebreak();
}
}
Redagavo ozzWANTED· 2008 Vas. 9 12:02:53