Pages: [1]
Print
Author Topic: Stats?  (Read 595 times)
Tonkow
Newbie
*
Posts: 29


www.tonkow.se/eng

msn@tonkow.se
View Profile WWW Email
« on: September 23, 2009, 01:04:05 PM »

Hello friends!
I wonder how I get statistics for the public? For example, how many comments I have received. How many posts I have written and how long I have blogged.

A really fun thing to have is, how do I get my top five commentators listed in the right order?
Logged

Love it!
Tonkow
Newbie
*
Posts: 29


www.tonkow.se/eng

msn@tonkow.se
View Profile WWW Email
« Reply #1 on: September 25, 2009, 06:10:45 AM »

I'd solved it like this.

Code:
<%
Dim tdlBlog

Set tdlBlog = Server.CreateObject("ADODB.Recordset")
tdlBlog.ActiveConnection = MM_blog_STRING
tdlBlog.Source = "SELECT Count(*) as tdlBlogcount FROM tblBlog WHERE BlogDraft = 0"
tdlBlog.CursorType = 0
tdlBlog.CursorLocation = 2
tdlBlog.LockType = 1
tdlBlog.Open()
%><b><%=(tdlBlog.Fields.Item("tdlBlogcount").Value)%></b> entries<br><%
Dim rsComments_Pending

Set rsComments_Pending = Server.CreateObject("ADODB.Recordset")
rsComments_Pending.ActiveConnection = MM_blog_STRING
rsComments_Pending.Source = "SELECT Count(*) as CommentsPendingCount FROM tblComment WHERE commentInclude = 1"
rsComments_Pending.CursorType = 0
rsComments_Pending.CursorLocation = 2
rsComments_Pending.LockType = 1
rsComments_Pending.Open()
%><b><%=(rsComments_Pending.Fields.Item("CommentsPendingCount").Value)%></b> comments<br>

Still I want a code which calculate the top 5 commentators.
Logged

Love it!
Pages: [1]
Print
Jump to: