1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
$sql11 ="SELECT ta.r_ampli, ta.s_noeud, ta.c_reseau, tc.amo_s_noeud, tc.ava_s_noeud, tc.s_noe_topamp, tc.id_cable
FROM tcable tc, tampli ta
WHERE tc.s_noe_tophfc = '".$data['amo_s_noeud']."'
AND tc.ava_s_noeud = ta.s_noeud
ORDER BY tc.amo_s_noeud, tc.ava_s_noeud
";
$result11 = mysql_query($sql11) or die('Ne trouve pas toutes les données1 : ' .
mysql_error());
$total = mysql_num_rows($result11);
$nbr = 0; // initialisation du compteur a 0
while($p = mysql_fetch_array($result11)){
//$a = array('1.10', 12.4, 1.13);
if (in_array($p['amo_s_noeud'], $a, true)) {
$amont = $p['amo_s_noeud'];
$aval = $p['ava_s_noeud'];
$couple = ($aval == $a[$nbr])? 'trouver' : 'Rien';
echo $couple.'<br>';
echo $amont.'am<br>';
echo $aval.'av<br>';
echo '**************************************<br>';
$nbr++; // incrémentation
}
} |
Partager