$req = 'select * from `'.$psql.'sonde_data` WHERE id="'.$s_name.'" AND boot="'.$boot.'" order by `cpt` DESC LIMIT '.$cpt2.',1'; $req = mysql_query($req, $connexion); while($data_sonde = mysql_fetch_object($req)); { /* * taille graph = 400 * début graphe = 31 * fin graphe = 431 */ $val = (197-($data_sonde->valeur*2)); imagesetpixel($im, $cpt, $val, $couleur[5]); $cpt--; $cpt2++; }