Pendant un moment je n'avais plus l'erreur et voila que je l'ai de nouveau :
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY POINTS DESC, DIFF DESC, BUTSPOUR DESC , BUTSCONTRE, NOM
Revoici ma page
<?php if (!isset($_GET['champ']))
{
$champ = $_SESSION['champ'];
}
else
{
$champ=$_GET['champ'];
}
$query = "SELECT phpl_divisions.nom, phpl_saisons.annee, (phpl_saisons.annee)+1
FROM phpl_championnats, phpl_divisions, phpl_saisons
WHERE phpl_championnats.id='$champ'
AND phpl_divisions.id=phpl_championnats.id_division
AND phpl_saisons.id=phpl_championnats.id_saison";
$result = mysql_query($query) or die (mysql_error());
while ($row=mysql_fetch_array($result))
{
echo "<div align=\"center\"><h4><b>".$row[0]." ".$row[1]."/".$row[2]."</b></h4></div>\n";
}
$class=0;
$lien="oui";
// RAPPEL DES PARAMETRES du CHAMPIONNAT
$result=mysql_query("SELECT accession, barrage, estimation, relegation, id_equipe_fetiche, fiches_clubs
FROM phpl_parametres
WHERE id_champ='$champ'");
$row=mysql_fetch_array($result);
$accession = $row['accession'];
$barrage = $row['barrage'] + $accession;
$estimation = $row['estimation'];
$fiches_clubs = $row['fiches_clubs'];
$id_equipe_fetiche=$row['id_equipe_fetiche'];
$relegation = $nb_equipe - $row['relegation'];
echo $champ;
$requete='SELECT DISTINCT * FROM phpl_clmnt_cache WHERE ID_CHAMP='.$champ.' ORDER BY POINTS DESC, DIFF DESC, BUTSPOUR DESC , BUTSCONTRE ASC, NOM';
clmnt($accession, $barrage, $relegation, $champ, $requete, $lien, $id_equipe_fetiche);
$query="SELECT max(phpl_journees.numero) FROM phpl_journees, phpl_matchs WHERE phpl_journees.id=phpl_matchs.id_journee and buts_dom is not NULL and phpl_journees.id_champ='$champ'";
$result=mysql_query($query) or die (mysql_error());
while ($row=mysql_fetch_array($result))
{
$numero=$row[0];
}
?>
<br /><br />
<?
if (!empty($numero)) {aff_journee($champ, $numero, CONSULT_CLMNT_MSG6, 0, $fiches_clubs, $id_equipe_fetiche);}
if ($numero<$nb_journees)
{
aff_journee($champ, $numero+1, CONSULT_CLMNT_MSG62, 0, $fiches_clubs, $id_equipe_fetiche);
}
mysql_close();
Ainsi que la fonction clmnt
<?php function clmnt($accession, $barrage, $relegation, $champ, $requete, $lien, $id_equipe_fetiche)
{
echo "<table class=\"tablephpl2\" align=\"center\" cellspacing=\"0\" width=\"60%\"><tr class=\"trphpl3\"><th colspan=\"11\">Classement général</th></tr>\n";
echo "<tr class=\"trphpl3\">
<th align=\"center\">Position</th>
<th align=\"left\">Equipes</th>
<th align=\"left\">Pts</th>\n";
echo "<th align=\"left\">J</th>
<th align=\"left\">V</th>
<th align=\"left\">D</th>
<th align=\"left\">PM</th>
<th align=\"left\">PE</th>
<th align=\"left\">Dif</th>
<th align=\"left\"></th></tr>\n";
$result = mysql_query($requete) or die (mysql_error());
$pl=1;
while ($row=mysql_fetch_array($result))
{
if ($row['NOM']==EXEMPT){continue;}
if ($pl<=$accession){echo '1<tr class="accession">';}
elseif ($pl<=$barrage){echo '2<tr class="barrage">';}
elseif ($pl>$relegation){echo '3<tr class="relegation">';}
elseif (($pl%2)==0){echo '4<tr class="ligne1">';}
else{echo '5<tr class="ligne2">';}
echo '<td align="center">'.$pl.'</td>';
$pl++;
$x=0;
while($x<8)
{
echo "<td>";
if ($x==0)
{
if ($row['id_equipe']==$_SESSION['id_equipe']){echo "<b>";}
if ($lien=='non'){echo "$row[$x]";}
else {echo "<a href=\"detaileq.php?champ=$champ&id_equipe=".$row['id_equipe']."\">$row[$x]</a>";
if ($row['id_equipe']==$_SESSION['id_equipe']){echo "</b>";}
}
}
else print $row[$x];
echo "</td>";
$x++;
}
echo "<td align=\"right\">";
$leg="graphique";
echo "<a href=\"#\" onclick=\"window.open('graph.php?equipe=".$row['ID_EQUIPE']."','Stats','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=560,height=320');return false;\"><img src=\"../images/graph.gif\" border=\"0\" alt=\"$leg\"></a>";
echo "</td></tr>\n";
}
echo "</table>";
}
Encore merci pour ton aide