
Membre
|
Salut voila un petit probleme ma requete veux pas aller chercher tou ceux de l'id designer ici le id du gang du joueur .. qui regarde la ville ..
Je vous montre le bout .. je voudrais quel va tout cherche via l'id du gang dans la table test mais pas seulement 1 des champ avec l'id qui correspon mais tout ceux qui son identik a lid du gang du joueur ..
<?php
$query = $db->execute("select * from `test` where `idgang`=?", array($player->gang));
while ($row = $query->fetchrow())
{
$query = $db->execute("select * from `players` where `prison`=0 and `cache`=0 and `level`=? and `ville`=? ORDER BY `hp` != `maxhp` desc ", array($player->level, $player->ville));
if ($query->recordcount() > 0)
{
echo "<table class=\"tableau\">\n";
echo "<tr><th width=\"20%\">Gang</th><th width=\"15%\">Joueur</th><th width=\"15%\">Contrat</th><th width=\"15%\">Attaque</a></th><th width=\"15%\">Vol</a></th><th width=\"15%\">Soigner</a></th><th width=\"15%\">Analyser</a></th></tr><tr>\n";
echo "";
while ($log = $query->fetchrow())
{
if ($log['tag'] == $row['allier']) {echo "<td width=\"20%\"><a href=gang_profile.php?id=" . $log['gang'] . "><font color=green>" . $log['tag'] . "</font></a></td>\n";}
elseif ($log['tag'] == $player->tag) {echo "<td width=\"20%\"><a href=gang_profile.php?id=" . $log['gang'] . "><font color=green>" . $log['tag'] . "</font></a></td>\n";}
elseif ($log['tag'] == $row['enemy']) {echo "<td width=\"20%\"><a href=gang_profile.php?id=" . $log['gang'] . "><font color=red>" . $log['tag'] . "</font></a></td>\n";}
elseif ($log['gang'] == 0) {echo "<td width=\"10%\">Sans</td>\n";}
else {echo "<td width=\"10%\"> <a href=gang_profile.php?id=" . $log['gang'] . ">" . $log['tag'] . "</a></td>\n"; }
echo "<td width=\"20%\"><p class=\"sm\"><a href=\"profile.php?id=" . $log['username'] . "\">" . $log['username'] . "</a></p></td>\n";
echo "<td width=\"15%\">" . numberformat($log['contrat'],0,'.',' ',3) . "</td>\n";
echo "<td width=\"15%\"><a href=\"battle12.php?act=attack&username=" . $log['username'] . "\">Attaquer</a> </td>\n";
echo "<td width=\"15%\"> <a href=\"battle12.php?act=vol&username=" . $log['username'] . "\">Voler </a></td>\n";
echo "<td width=\"15%\"><a href=\"battle12.php?act=heal&username=" . $log['username'] . "\">Soigner </a></td>\n";
echo "<td width=\"15%\"><a href=\"battle12.php?act=analyse&username=" . $log['username'] . "\">Analyser</a></td></tr>\n";
}
}
else //Display error message
{
echo "<tr>\n";
echo "<td colspan=\"3\">Pas de joueur trouver. Change les critères !</td>\n";
echo "</tr>\n";
}
}
echo "</table>\n";
include("templates/private_footer.php");
break;
}
}
else {
include("templates/private_header.php");
echo "Tu ne peux pas aller ici !<br />";
echo "Sois tu es cacher, sois en prison !";
include("templates/private_footer.php");}
?>
https://guerredesgangs.net & http://www.bazinio.ca & http://www.thestreet2.ca
|