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