| Current Path : /var/www/cesa.co.za/relay/include/ |
| Current File : /var/www/cesa.co.za/relay/include/entrants.php |
<br/>
<h1>Entrants</h1>
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<th align='left'>Company</th>
<th align='left'>Team</th>
<th align='left'>Type</th>
</tr>
<?php
$bgcnt=1;
$query="SELECT * FROM saace_company WHERE status='1' ORDER BY name ASC";
$result=mysql_query($query);
if ($result) {
while ($row=mysql_fetch_assoc($result)) {
$selquery="SELECT * FROM saace_team WHERE comp_id='".$row['id']."' AND status='1'";
$selres=mysql_query($selquery);
if ($selres && mysql_num_rows($selres)>0) {
echo "<tr";
if ($bgcnt%2==0) {
echo " class='odd'";
} else {
echo " class='even'";
}
echo ">\n";
echo "<td><b>".$row['name']."</b></td>\n";
$selrow=mysql_fetch_assoc($selres);
echo "<td>".$selrow['name']."</td>\n";
$typquery="SELECT * FROM saace_teamtype WHERE id='".$selrow['type']."'";
$typres=mysql_query($typquery);
if ($typres) {
$typrow=mysql_fetch_assoc($typres);
echo "<td>".$typrow['name']."</td>\n";
}
echo "</tr>\n";
$bgcnt++;
while ($selrow=mysql_fetch_assoc($selres)) {
echo "<tr";
if ($bgcnt%2==0) {
echo " class='odd'";
} else {
echo " class='even'";
}
echo ">\n";
echo "<td></td>\n";
echo "<td>".$selrow['name']."</td>\n";
$typquery="SELECT * FROM saace_teamtype WHERE id='".$selrow['type']."'";
$typres=mysql_query($typquery);
if ($typres) {
$typrow=mysql_fetch_assoc($typres);
echo "<td>".$typrow['name']."</td>\n";
}
echo "</tr>\n";
$bgcnt++;
}
}
} //end while
}
?>
</table>