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
| for (p = 1 ; p < 21 ; p++)
{
var id_produit = Request.Form("id_produit_"+p);
if (typeof(id_produit) != "undefined")
{
req = "SELECT * FROM produits WHERE (id="+id_produit+")";
RS.Open(req,conn_indus,3,1);
if (!RS.EOF)
{
var nom_produit = RS("nom_produit").value;
var no_formule = RS("code_produit").value;
}
RS.Close;
var tonnage = parseInt(Request.Form("tonnage_"+p));
var commande = Request.Form("commande_"+p);
var heure_demarrage = String(Request.Form("heure_demarrage_"+p)).replace(/'/g,"''");
var demarrage = Request.Form("demarrage_"+p);
req = "INSERT INTO produits (id_plann,tonnage,heure_demarrage,demarrage,commande,no_formule,nom_produit,id_centrale,id_agence) VALUES ("+id_plann+","+tonnage+
",'"+heure_demarrage+"','"+demarrage+"','"+commande+"','"+no_formule+"','"+nom_produit+"',"+id_centrale+","+id_agence+")";
conn_tonnage.Execute(req);
}
} |
Partager