Ok the code I have here Lists the members in a clan within the game..It is working the way it is supposed to..
However the Clan Leader sees a ghost empire in the clan list..
How do I eliminate the ghost?
Code: Select all
print "
<table width=60% bgcolor=#333333 border=1>\n";
print "<caption>Empire List</caption>";
$dball = mysql_db_query($dbname,"select empire,num,forces from $playerdb where alliance='$users[alliance]';");
do {
$allnum += 1;
$listally = mysql_fetch_row($dball);
$num = $listally[1];
$ally = mysql_fetch_row(mysql_db_query($dbname,"select networth,rank from $playerdb where num='$num';"));
$infantry = mysql_fetch_row(mysql_db_query($dbname,"select infantry from $playerdb where num='$num';"));
$race2 = mysql_fetch_row(mysql_db_query($dbname,"select race2 from $playerdb where num='$num';"));
$tanks = mysql_fetch_row(mysql_db_query($dbname,"select tanks from $playerdb where num='$num';"));
$helis = mysql_fetch_row(mysql_db_query($dbname,"select helis from $playerdb where num='$num';"));
$ships = mysql_fetch_row(mysql_db_query($dbname,"select ships from $playerdb where num='$num';"));
$turns = mysql_fetch_row(mysql_db_query($dbname,"select turns from $playerdb where num='$num';"));
$land = mysql_fetch_row(mysql_db_query($dbname,"select land from $playerdb where num='$num';"));
$runes = mysql_fetch_row(mysql_db_query($dbname,"select runes from $playerdb where num='$num';"));
$wizards = mysql_fetch_row(mysql_db_query($dbname,"select wizards from $playerdb where num='$num';"));
$ally[0] = commas($ally[0]);
if ($users[num] == $alliance[founder]) {
print "
<TR><TD bgcolor=#000000>$listally[0] (#$listally[1])</td>
<TD bgcolor=#000000>Networth: \$$ally[0]</td>
<TD bgcolor=#000000>Land: $land[0]</td>
<TD bgcolor=#000000 align=center>Rank: $ally[1]</TD></tr>
<tr><TD bgcolor=#000000>Infantry: $infantry[0]</td>
<TD bgcolor=#000000>Catapults: $tanks[0]</td>
<TD bgcolor=#000000>Dragons: $helis[0]</td>
<TD bgcolor=#000000>Ships: $ships[0]</td></tr>
<tr><TD bgcolor=#000000>Race: $race2[0]</td>
<TD bgcolor=#000000>Turns: $turns[0]</td>
<TD bgcolor=#000000>Priests: $wizards[0]</td>";
if ($listally[2] == "1") { print "<TD align=center bgcolor=#000000><font color=lime>Sharing: YES</font></TD></TR></tr><tr><td colspan=4><center> </center></td></tr>"; }
else {print "<TD bgcolor=#000000 align=center><font color=red>Sharing: NO</font></TD></TR><tr><td colspan=4><center> </center></td></tr>"; }
} elseif ($listally[1] != "") {
print "
<TR><TD bgcolor=#000000>$listally[0] (#$listally[1])</td>
<TD bgcolor=#000000>Networth: \$$ally[0]</td>
<TD bgcolor=#000000>Land: $land[0]</td>
<TD bgcolor=#000000 align=center>Rank: $ally[1]</TD>";
if ($listally[2] == "1") { print "<TD align=center bgcolor=#000000><font color=lime>Sharing: YES</font></TD></TR></tr><tr><td colspan=4><center> </center></td></tr>"; }
else {print "<TD bgcolor=#000000 align=center><font color=red>Sharing: NO</font></TD></TR><tr><td colspan=4><center> </center></td></tr>"; }
}
} while ($listally[1] != "");
print "</table><br>\n";