Liste des matchs qui dont on connait les joueurs mais pas le resultat. |
|---|
";
include("conf.php");
include("mysql_compat.php");
include ("conf.php");
$db_connection=mysql_connect($db_host,$db_user,$password);
mysql_select_db($db_name,$db_connection);
//////////////////////////////////////////////////RECHERCHE INFO SUR LA CATEGORIE////////////////////////////////////
$requete="SELECT avencement, type FROM `categorie` WHERE id_categorie = '$categorie' ;";
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."
");
$reptab=mysql_fetch_array($reponse);
$avencement=$[''];
if ($['']=='double' or $['']=='mixte') $double=1; else $double=0;
//////////////////////////////////////////RECHERCHE DES MATCH DE LA CATEGORIE QUI N'ONT PAS DE GAGNANT///////////////
$requete="SELECT avencement, tour FROM `match` WHERE categorie = '$categorie' AND avencement >= '$avencement' AND vainqueur IS NULL GROUP BY avencement, tour ORDER BY avencement DESC, tour ASC;";
$reponse=mysql_query($requete,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."
");
$i=0;
while($reptab=mysql_fetch_array($reponse)){
$list_tour[$i][tour]=$[''];
$list_tour[$i][avencement]=$[''];
$i++;
}
$tab_classement=array("0 ou mieux","1/6","2/6","3/6","4/6","5/6","15","15/1","15/2","15/3","15/4","15/5","30","30/1","30/2","30/3","30/4","30/5","NC");
for($i=0;$i
");
$reptab2=mysql_fetch_array($reponse2);
$joueur1=$[''];
}
if ($[''][0]!='Q') $joueur2=$[''];
else {
$no_match=explode("Q",$['']);$no_match=$no_match[1];
$requete2="SELECT vainqueur FROM `match` WHERE id_match='".$no_match."'";
$reponse2=mysql_query($requete2,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."
");
$reptab2=mysql_fetch_array($reponse2);
$joueur2=$[''];
}
//echo "****".$['']."****
";
$match="";
if ($joueur1 and $joueur2){
$requete2="SELECT nom, prenom, classement, id_inscription FROM `inscription`,`joueur` WHERE inscription.id_inscription = '$joueur1'AND inscription.joueur=joueur.id_joueur;";
$reponse2=mysql_query($requete2,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."
");
$reptab2=mysql_fetch_array($reponse2);
$texte1=$['']." ".$['']." : ".$tab_classement[$['']];
$requete2="SELECT nom, prenom, classement, id_inscription FROM `inscription`,`joueur` WHERE inscription.id_inscription = '$joueur2'AND inscription.joueur=joueur.id_joueur;";
$reponse2=mysql_query($requete2,$db_connection) or die ("Erreur no".mysql_errno()." : ".mysql_error()."
");
$reptab2=mysql_fetch_array($reponse2);
$texte2=$['']." ".$['']." : ".$tab_classement[$['']];
$list_match[$i][id_match][]=$[''];
$list_match[$i][joueur1][]=$texte1;$list_match[$i][inscription1][]=$joueur1;
$list_match[$i][joueur2][]=$texte2;$list_match[$i][inscription2][]=$joueur2;
}
}
}
echo "";
mysql_close($db_connection);
include("piedDePage.php");
?>