Forum » » Le coin des codeurs » » Equivalence
Posté : 30 juin 2005 à 11:09
$sql = "SELECT champ1, champ2, ... champX FROM ma_table WHERE ma_condition";
$result = mysql_query(sql);
while( $un_resultat = mysql_fetch_array($result) ) {
$champ1 = $un_resultat['champ1'];
$champ2 = $un_resultat['champ2'];
....
$champX = $un_resultat['champX'];
// ce que tu veux avec ces champs
// au prochain passage dans cette boucle, tu obtiendras le prochain enregistrement dans ta table
// correspondant au critere SELECT que tu as defini
}
Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=17086&forum=5