Why is this code pulling out every result in my roster table?... I only want people with the inactive status, in the status row pulled out.
<?php
$db = mysql_connect("localhost","jointops_xfactor","xxxx");
mysql_select_db (jointops_xfactor);
$sql = "SELECT * FROM roster WHERE game='{$_REQUEST['game']}'
|| game2='{$_REQUEST['game']}'
|| game3='{$_REQUEST['game']}'
|| game4='{$_REQUEST['game']}'
|| status='inactive' order by rankposition asc";
if (!$result = mysql_query($sql)) {
print "Invalid query ($sql) : " . mysql_error();
exit;
}
while ($row = mysql_fetch_assoc($result)) {
print "<table width=598 align=center>
<tr>
<td width=20%><a href=soldier.php?soldierid={$row['soldierid']}><font face=Verdana size=1 color=8d8d8d><B>{$row['name']}</B></a></td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['rank']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['location']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['joined']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['specialty']}</td></tr>
<tr>
<td colspan=8 width=100% bgcolor=444444 height=2>
</td></tr>
</table>";
}
?>