Limitation requete + affichage page par page ???
Posté : 04 sept. 2006, 14:33
Bonjour !!!
je suis actuellement à cours de solution pour faire un limite de 5 avec un affichage page par page tous simple avec cette requette , jvous en pris aidez moi
si vous avez une solution de départ çà m'aiderai bocoup...
car avec une seule requete je m'ensort bien mais 2 conditions + 1 else là je bloque!!!
merci d'avance pour votre aide !!!
je suis actuellement à cours de solution pour faire un limite de 5 avec un affichage page par page tous simple avec cette requette , jvous en pris aidez moi
si vous avez une solution de départ çà m'aiderai bocoup...
car avec une seule requete je m'ensort bien mais 2 conditions + 1 else là je bloque!!!
merci d'avance pour votre aide !!!
<?
//recup variable
mysql_select_db("$database");
$table="gst_match";
$equipe=$_POST['equipe'];
$nb_enr0 = mysql_query("Select count(numero) as nbe from $table where equipe='$equipe'");
$do = mysql_fetch_array($nb_enr0);
$nm_t = $do['nbe'];
// si le nombre de post est superieur à 0
if ($nm_t>0)
{
//equipe 1
$detail_equipe = mysql_query("SELECT * FROM $table where equipe='$equipe'");
while ($rest = mysql_fetch_array($detail_equipe) )
{
$n_tour=$rest['n_tour'];
$n_match=$rest['n_match'];
//equipe 2
$detail_equipe2 = mysql_query("SELECT * FROM $table where n_tour='$n_tour' AND n_match!=$n_match");
while ($rest2 = mysql_fetch_array($detail_equipe2) )
{
?>
<table width="90%" height="102" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="9" height="19"><img src="images/gh.gif" width="9" height="19" /></td>
<td colspan="5" background="images/h.gif"> </td>
<td width="10"><img src="images/dh.gif" width="9" height="19" /></td>
</tr>
<tr>
<td rowspan="2" background="images/g.gif"><img src="images/g.gif" width="9" height="19" /></td>
<td width="108" align="center"><strong><?=$rest['equipe'];?></strong></td>
<td width="100" align="center"><strong><?=$rest['but_p'];?> </strong></td>
<td width="101" height="64" align="center"><img src="images/vs.gif" width="64" height="64"></td>
<td width="90" align="center"><strong><?=$rest['but_c'];?></strong></td>
<td width="134" align="center"><strong><?=$rest2['equipe'];?> </strong></td>
<td rowspan="2" background="images/d.gif"><img src="images/d.gif" width="9" height="19" /></td>
</tr>
<tr></tr>
<tr>
<td height="19"><img src="images/gb.gif" width="9" height="19" /></td>
<td colspan="5" align="center" background="images/b.gif"><strong><font color="#FFFFFF" size="2"><font color="#000000">Match Joué le </font></font>
<?
$dateS= explode(" ",$rest['date']);
$dateJ=explode("-",$dateS[0]);
echo $dateJ[2]."-".$dateJ[1]."-".$dateJ[0] ;
?>
<font color="#FFFFFF" size="2"><font color="#000000">à </font></font><?$heure= explode(" ",$rest2['heure']);
$heureh=explode(":",$heure[0]);
echo $heureh[0].":".$heureh[1] ;?></strong></td>
<td><img src="images/db.gif" width="9" height="19" /></td>
</tr>
</table><br>
<? }
}
//si aucun résultat
}else {echo "<br><center><img src='images/alerte.png' align='middle'> <font color='red'><b>----- Aucuns Matchs Effectués à ce Jour !!! -----</b></font> <img src='images/alerte.png' align='middle'></center>";}
?>