FirefighterKyle
I am Kyle!!
- Sep 14, 2012
- 162
- 7
Okay so I am trying to make a rank page for a game I am playing, I am having a hard time understanding why it shows the wrong ranks when I am calling something else.
Here is my code.
It should show (Private, PFC, Senior Private, and Corporal) but it is showing the last 4 like so (Minister of HS, Director oO, General, and Lieuten Gen) Why won't it show the Private etc since I am saying to show "`type` = 1" ??
Here is my code.
PHP:
<?php
$rankCount = mysql_num_rows(mysql_query("SELECT * FROM `ranks` WHERE `type` = '1' && `branch` = 1"));
if ($rankCount > 0)
{
for ($i=1; $i<=$rankCount; $i++)
{
$rankInfo = mysql_fetch_array(mysql_query("SELECT * FROM `ranks` WHERE `ladder` = '".$i."'"));
$getMembers = mysql_query("SELECT * FROM `members` WHERE `position` = '".$rankInfo['id']."' ORDER BY `update_date` ASC");
echo '<a href="#">'.$rankInfo['title'].' ('.mysql_num_rows($getMembers).')</a><br />';
if (mysql_num_rows($getMembers) > 0)
{
while($memberInfo = mysql_fetch_array($getMembers))
{
echo '<table width="100%">
<tr>
<td>
<strong>Name:</strong> <a href="/member/'.$memberInfo['id'].'">'.$memberInfo['name'].'</a><br />
<strong>Tag:</strong> '.$memberInfo['tag'].'<br />
'.$memberInfo['train_promo'].' <strong>'.$memberInfo['promo_by'].'</strong> on '.date("m/d/y", $memberInfo['update_date']).'<br />
<strong>Graded by:</strong> '.$memberInfo['graded_by'].'<br /><br />
</td></tr></table>';
}
}
else
'<i>There currently no on in this position.</i><br />';
}
}
else
'<i>This branch has no ranks yet please check back later.</i>';
?>
It should show (Private, PFC, Senior Private, and Corporal) but it is showing the last 4 like so (Minister of HS, Director oO, General, and Lieuten Gen) Why won't it show the Private etc since I am saying to show "`type` = 1" ??