Parašė WantedBoy· 2008 Sau. 29 18:01:00
#1
Kaip i shi koda iterpti tn vieton kur raudonai parasyta:
<?
require_once "../../maincore.php";
require_once BASEDIR."subheader.php";
require_once BASEDIR."side_left.php";
opentable("rezai");
echo "<table width='100%'>\n";
$uzklausa=mysql_query("SELECT komanda1, rez1, rez2, komanda2 from ".$db_prefix."keitimai order by id");
if (dbrows($uzklausa)) {
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>
<td class='tbl1'>Skirtumas</td>
</tr>\n";
$i = 1;
while ($data = dbarray($uzklausa)) {
$i = $i+1;
$tbl = $i%2 == 0 ? "class='tbl2'" : "class='tbl1'";
echo "<tr>
<td $tbl>".$data['komanda1']."</td>
<td $tbl>".$data['rez1']."</td>
<td $tbl>".$data['rez2']."</td>
<td $tbl>".$data['komanda2']."</td>
<td $tbl> Kaip chia ta koda iterpti?</td>
</tr>\n";
}
}
echo "</table>\n";
closetable();
require_once BASEDIR."side_right.php";
require_once BASEDIR."footer.php";
?>
Si koda?
<?
$rez1 = "".$data['rez1']."";
$rez1 = "".$data['rez1']."";
$skirtumas = $rez1 - $rez2;
echo "$skirtumas";
?>
Redagavo WantedBoy· 2008 Vas. 12 17:02:55