<% Set conDBase = Server.CreateObject("ADODB.Connection") conDBase.Open application("PCDDB") Set rstMain = Server.CreateObject("ADODB.Recordset") rstMain.Open "SELECT DISTINCT Category, COUNT(Category) AS Total FROM pcd_entities GROUP BY Category", conDBase , 3 , 1 Do until rstmain.eof response.write "" & rstmain("Category") & " (" & rstmain("Total") & ")Últimas entidades introduzidas" rstmain.movenext loop rstMain.close %>
<% rstMain.Open "SELECT top 4 EntityID, Category,EntityName,Local FROM pcd_Entities order by DateAdded desc;", conDBase , 3 , 1 do until rstmain.eof response.write "" & rstmain("EntityName") & "[ voltar para cima ]
" & rstmain("Category") & " - " & rstmain("Local") & "" rstmain.movenext Loop rstMain.Close conDBase.close %>