So I've been playing a browser based strategy game called Travian for the past few months. You could kind of equate it to an RTS that you play over a year or so.
Alliances can be formed in the game, and alliances commonly create multiple wings, which starts making communication harder.
You can use this script to build a table of links to all players within said alliances:
Here's what the code looks like to build a table of a single wing
$query1 = "SELECT distinct uid, player from x_world where alliance = 'RATAN' order by player";
$results = mysql_query($query1) or die(mysql_error());
while ($row = mysql_fetch_array($results))
{
extract($row);
echo "http://s5.travian.us/nachrichten.php?t=1&id=". $uid ."\">" . $player ;
}
?>
But what if you have multiple wings?
Ideally I should have stored the alliance(s) in an array, but this was one of the first php apps I wrote, so I just duplicated the working code.




