Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsUsers OnlineUsers OnlineAccounting Users On LineAccounting Users On Line
Previous
 
Next
New Post
11/18/2005 3:52 AM
 

Version: Dotnetnuke 3.1.1

I change the sql code ("GetOnlineUserStatistics") because in my view it's better to have new members on the day and not members in last day. And the text on this module goes in this way.

See the code :


CREATE procedure dbo.GetOnlineUserStatistics

@PortalID  int

as

-- Anonymous User Count
select count(*)
from  AnonymousUsers
where PortalId = @PortalID

-- Users Online Count
select count(*)
from UsersOnline
where PortalId = @PortalID

-- Last User Registered
SELECT UserName,
       UserID
FROM   Users
WHERE  UserID = (select top 1 UserId from UserPortals where PortalID = @PortalID order by UserPortalId desc)

-- Membership Count
select count(*)
from   UserPortals
where PortalId = @PortalID

-- Members Today
select count(*)
from UserPortals
where PortalId = @PortalID and cast(convert(char(11),CreatedDate) as datetime) = cast(convert(char(11),DateAdd(d, 0, GetDate())) as datetime) -- modify by ms 11.11.2005
-- Members in Last Day
--where PortalId = @PortalID and CreatedDate > DateAdd(d, -1, GetDate())

-- Members day before
select count(*)
from UserPortals
where PortalId = @PortalID and cast(convert(char(11),CreatedDate) as datetime) = cast(convert(char(11),DateAdd(d, -1, GetDate())) as datetime) -- modify by ms 11.11.2005
--where PortalId = @PortalID and CreatedDate > DateAdd(d, -2, GetDate()) and CreatedDate < DateAdd(d, -1, GetDate())
GO

Hope he can helps you.

Michel STOFFEL

 
New Post
12/2/2005 9:41 AM
 
Hi,
My 4rum using DNN 3.013, Statistics of my 4rum incorrect!
 
for example:
 
  Statistics   
     14791 users have contributed to 1648 thread(s) and 8010 post(s).--->>correct
 In the past 24 hours, we have 5 new thread(s) and 11 new post(s). --->>correct
 The most popular thread has been "Object Reference error when accessing via alias to site"--->>incorrect
 
 The most active thread has been "What ideas are floating around? "--->>incorrect
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsUsers OnlineUsers OnlineAccounting Users On LineAccounting Users On Line


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out