ciao a tutti...mi hanno fatto questo codice, ma io nn riesco a capirlo,ora che vorrei apportare qualche modifica, ovviamente nn riesco xchè nn lo capisco,
potete darmi una mano e spiegarmi (se riuscite) tutti i vari passaggi????
Grazie 1000
codice:<% SQLCat = " SELECT ID, SCategoria FROM SCategorie ORDER by Scategoria asc " Set RScat = Conn.Execute(SQLCat) If Not RSCat.EOF Then SCatArr = RScat.GetRows If QSSCategoria <> "" Then SQLCat = " SELECT ID, Categoria FROM Categorie WHERE SCategoria = " & QSSCategoria Set RSCat = Conn.Execute(SQLCat) If Not RSCat.EOF Then CatArr = RSCat.GetRows BoolCategorie = True Else BoolCategorie = False End If RSCat.Close End If For Icat = 0 to UBound(SCatArr, 2) sqlcont = " SELECT COUNT(*) AS TotaleRecord FROM Prodotti WHERE cancellato = false and sCategoria = "&sCatArr(0,ICat) Set rscont = Conn.Execute(sqlcont) Rectot = (rscont("TotaleRecord")) rscont.Close Set rscont= Nothing %> <%if CStr(SCatArr(0,ICat)) = QSSCategoria then%> <%else%> <%end if%> <% If CStr(SCatArr(0,ICat)) = QSSCategoria Then If boolCategorie Then For K = 0 To UBound(CatArr,2) %> <% sqlcontsc = " SELECT COUNT(*) AS TotaleRecord FROM Prodotti WHERE cancellato = false and Categoria = "&CatArr(0,k) Set rscontsc= Conn.Execute(sqlcontsc) Rectotsc = (rscontsc("TotaleRecord")) rscontsc.Close Set rscontsc = Nothing %> <%if CStr(CatArr(0,k)) = QSCategoria then%> <%if SCategoria <> "" then%> <tr> <td valign="top" width="36%" nowrap bgcolor="#003399"> ▪<a href="?scat=<%=SCatArr(0,ICat)%>&cat=<%=CatArr(0,k)%>"><%=CatArr(1,k)%> ( <%Response.Write rectotsc%> ) <%end if%> <%if SCategoria = "" then%> ►<%=CatArr(1,k)%>( <%Response.Write rectotsc%> ) </a> <%end if%> <% SQLCat = " SELECT * FROM S_Categorie WHERE Categoria = " & CatArr(0,k) Set RSCat = Conn.Execute(SQLCat) While Not RSCat.EOF %> <% sqlcontsc2 = " SELECT COUNT(*) AS TotaleRecord FROM Prodotti WHERE cancellato = false and S_Categoria = "&RSCat("ID") Set rscontsc2= Conn.Execute(sqlcontsc2) Rectotsc2 = (rscontsc2("TotaleRecord")) rscontsc2.Close Set rscontsc2 = Nothing %> <%if StrComp(SCategoria, RSCat("ID")) <> 0 then%> ▪"><%=RSCat("S_Categoria")%> (<%=Rectotsc2%>) <tr> <td valign="top" width="36%" bgcolor="#CC9933" nowrap> <%end if%> <%if StrComp(SCategoria, RSCat("ID")) = 0 then%> ►<%=RSCat("S_Categoria")%> (<%=Rectotsc2%>) <%end if%> <% RSCat.MoveNext Wend RSCat.close %> <%else%> <%if SCategoria = "" then%> ▪<a href="?scat=<%=SCatArr(0,ICat)%>&cat=<%=CatArr(0,k)%>"><%=CatArr(1,k)%> ( <%Response.Write rectotsc%> )</a> <%end if%> <%if SCategoria <> "" then%> ▪<a href="?scat=<%=SCatArr(0,ICat)%>&cat=<%=CatArr(0,k)%>"><%=CatArr(1,k)%> ( <%Response.Write rectotsc%> )</a> <%end if%> <%end if%> <% Next End If End If Next Else %> <%=NoCategoria%> <% End If %>![]()

Rispondi quotando