Probleme avec LIMIT

hoodlum Messages postés 57 Date d'inscription lundi 16 mai 2005 Statut Membre Dernière intervention 24 septembre 2010 - 22 mai 2005 à 01:39
cs_Anthomicro Messages postés 9433 Date d'inscription mardi 9 octobre 2001 Statut Membre Dernière intervention 13 avril 2007 - 22 mai 2005 à 12:17
Bonjour g un gros probleme !!
quand je fais cette requete:
$offset=0;
$nbmax=5;
$queryst="SELECT no FROM possede WHERE (possede.id_style)='$id_style' LIMIT $offset, $nbmax";
$resst=mysql_query($queryst);
while($tablea=mysql_fetch_array($resst)){
$no=$tablea["no"];
echo"$no";
}
a la sortie g tout les resultat et non les 5 premiers!! KE fer?

2 réponses

hoodlum Messages postés 57 Date d'inscription lundi 16 mai 2005 Statut Membre Dernière intervention 24 septembre 2010
22 mai 2005 à 01:50
/auteurdetail.aspx?ID=512987 mais kan je fais:
$offset=0;
$nbmax=5;
$queryst="SELECT no FROM possede WHERE (possede.id_style)='$id_style' LIMIT 0 , 5";
$resst=mysql_query($queryst);
while($tablea=mysql_fetch_array($resst)){
$no=$tablea["no"];
echo"$no";
}
ca me donne les 5 premier
0
cs_Anthomicro Messages postés 9433 Date d'inscription mardi 9 octobre 2001 Statut Membre Dernière intervention 13 avril 2007 8
22 mai 2005 à 12:17
Salut,



$offset=0;

$nbmax=5;



$resst=mysql_query("SELECT no FROM possede WHERE possede.id_style='".$id_style."' LIMIT ".$offset.",".$nbmax);



while($tablea=mysql_fetch_row($resst))

{

echo $tablea[0];

}



a +

<hr size="2" width="100%">




<li>Entraide, dépannage et vulgarisation informatique: Mon site de vulgarisation informatique</li>
0
Rejoignez-nous