|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
My 'Forum Stats' island shows a certain number of 'members'. However the number of 'users' in ubbt_USERS has a figure that is different by a count of 11. I need the correct count for a script I'm writing. Can someone please advise the correct table to use? And perhaps why there is a difference of 11? Thanks
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
I'd go with the query from the forum_stats builder: $query = "
SELECT COUNT(USER_ID) AS COUNT
FROM {$config['TABLE_PREFIX']}USERS
WHERE USER_IS_APPROVED = 'yes' AND USER_ID > 1
";
And it's possible that one is counting banned or non-approved members.
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Thanks Giz, that works for me.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Another route, if you want it to reflect how many users have registered versus who's still there (would include banned, not approved, and non existent (anymore) users) would be to just grab the ID of the last person who registered and use that as your "count"...
|
|
|
|
Joined: Jan 2004
Posts: 2,474 Likes: 3
Pooh-Bah
|
Pooh-Bah
Joined: Jan 2004
Posts: 2,474 Likes: 3 |
Thanks for that mate, but (if I'm honest) I'm looking for an upspin on the stats whilst staying honest. In other words, I am selling to advertisers the number of 'members'. I hope that doesn't come across in a bad light, but the recession is still biting.
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
Well, it's not being *dishonest* really, you're showing the total member of users who've registered over time (at least since you converted your forum to v7); though I understand
|
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
1 members (Ruben),
667
guests, and
166
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|