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 35
| $tab_ddate = array();
$tab_syscaa = array();
$tab_gps = array();
$tab_sgtqs = array();
$tab_numes = array();
$tab_nbr = array();
while (ocifetch($resultat)){
$DDATE=ociresult($resultat,1);
$SYSCAA=ociresult($resultat,2);
$GPS=ociresult($resultat,3);
$SGTQS=ociresult($resultat,4);
$NUMES=ociresult($resultat,5);
$NBR=ociresult($resultat,6);
$tab_ddate[$index] = "$DDATE";
$tab_syscaa[$index] = "$SYSCAA";
$tab_gps[$index] = "$GPS";
$tab_sgtqs[$index] = "$SGTQS";
$tab_numes[$index] = "$NUMES";
$tab_nbr = "$NBR";
$index=$index+1;
}
echo $index;
include ('connexion_pems.ini');
for ($i=1; $i <= 100; $i++) {
$sql="insert INTO historique (DDATE,SYSCAA,GPS,SGTQS,NUMES,NBR) VALUES ('$tab_ddate[$i]','$tab_syscaa[$i]',
'$tab_gps[$i]','$tab_sgtqs[$i]','$tab_numes[$i]','$tab_nbr[$i]')";
$res = mysql_query($sql) or die ("requete incorrecte au niveau de la copie de donnees a partir de ICB");
}
for ($i=101; $i <= 200; $i++) {
$sql="insert INTO historique (DDATE,SYSCAA,GPS,SGTQS,NUMES,NBR) VALUES ('$tab_ddate[$i]','$tab_syscaa[$i]',
'$tab_gps[$i]','$tab_sgtqs[$i]','$tab_numes[$i]','$tab_nbr[$i]')";
$res = mysql_query($sql) or die ("requete incorrecte au niveau de la copie de donnees a partir de ICB");
} |
Partager