<% starttime = timer() %> <% if request.form("ajouter")=1 then else mess = request.querystring("message") vref = request.querystring("num") dim tot_cat, Nb_par_colonne tot_cat = cint(0) set Recordset = Server.CreateObject("ADODB.Recordset") Recordset.ActiveConnection = MM_actu_STRING Recordset.Source = "SELECT * from liste_categories WHERE code_categorie =" & request("num") & ";" Recordset.CursorType = 0 Recordset.CursorLocation = 2 Recordset.LockType = 3 Recordset.Open() while not Recordset.eof tot_cat = tot_cat + 1 Recordset.movenext wend Recordset.close set Recordset = nothing tot = cint(trim(tot_cat)) redim qt_categorie(tot), categorie(tot),nom_categorie(tot) set Recordset12 = Server.CreateObject("ADODB.Recordset") Recordset12.ActiveConnection = MM_actu_STRING Recordset12.Source = "SELECT *, Count(materiels.Materiel) AS QT_mat FROM materiels INNER JOIN categories ON (materiels.c_materiel = categories.c_mater) INNER JOIN liste_categories ON (categories.c_categorie = liste_categories.code_categorie) WHERE code_categorie =" & request("num") & " group by categories.c_categorie ORDER BY materiels.Materiel ASC ;" ' AND MATCH (materiels.query ) AGAINST ('-poids' ) Recordset12.CursorType = 0 Recordset12.CursorLocation = 2 Recordset12.LockType = 3 Recordset12.Open() bx = 0 while not Recordset12.eof nom_categorie(bx) = Recordset12("nom") categorie(bx) = Recordset12("code_categorie") qt_categorie(bx) = int(trim(Recordset12("QT_mat"))) bx = bx + 1 Recordset12.movenext wend Recordset12.close set Recordset12 = nothing %>