Previous Thread
Next Thread
Print Thread
Rate Thread
#237039 02/19/2003 11:48 AM
Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
There are 880 rows in my users table. My Main Index page says I have 770 registered users, and in the admin area the User stats page says I have 777.

How can I make all these totals agree with one another?

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Are there any unapproved or unverified user names?

What version of threads are you on?

SELECT *
FROM w3t_Users
WHERE U_Approved != 'yes'

That should grab all unapproved/unverified users.
You could either approve or delete them.

Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
Hi Josh,

I'm not using registration approval, so I guess that's not it. I have an average of 15 new members per day, some of which give phony or mis-typed email addresses so I guess 3 or 4 per day would not get verified. Even so, would that be a reason for the stats to report different numbers on different pages...?

I'm on version 6.2.2. The discrepancy in the numbers isn't causing anyone any trouble except me, being the stickler for detail that I am.

http://forum.foolmoon.com/ubbthreads.php

Thanks.


Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[]the admin area the User stats page says I have 777[/]

Where exactly does it say that? I couldn't find a total user count in the admin page. It only breaks them down by group.

Did you try Josh's query?

Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
showstats.php:

Stats for this site.

Group Total # of users in this group
Administrators 4
Moderators 14
Users 787
Guests 0
Staff 36

New Users in past 24 hours 28
New Users in past 7 days 80
New Users in past month 239

Users that have logged in the past 24 hours 120
Users that have logged in the past 7 days 217
Users that have logged in the past month 417
Users that have never logged in 191

-----------------------

Extra information
You are logged in as Helice
Show favorite forums.
773 Registered User(s).
Welcome to our newest member, lara
There are 22 registered and 78 anonymous users online.
Current adjusted date is: 02/19/03 05:49 PM


-----------------------

Josh's query yielded a few names that had registered today and were not yet verified. Not enough to make up the difference between the 773 shown in the Extra Information, the 787 shown in the admin user stats, and the 790 rows in my w3t_Users table.



Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I don't get it.

You have 787 members shown but 790 rows in the table?

OK one of them is user#1 the placeholder for anonymous users. So then you had 2 that were not yet verified, right?

What is the count if you do this:

SELECT COUNT(*)
FROM w3t_Users
WHERE U_Approved = 'yes'

Is that 787 or 788?
Or does that come back the same as the main index page?

I don't know why the ubbthreads script would be counting wrong

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Try this query:

SELECT COUNT(*)
FROM w3t_Users
WHERE U_Approved != 'yes'
OR U_Approved IS NULL

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Ah... good point Dave. This could be the "NULL" thing biting us again.

Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
Results from your SQL command

Here are the results of your command: "SELECT COUNT(*) FROM w3t_Users WHERE U_Approved != 'yes' OR U_Approved IS NULL ".
COUNT(*)
16





Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
OK there are some where the U_Approved field is empty.

That throws the couunt off..... as the main index only counts those specifically with 'yes'

UPDATE w3t_Users
SET U_Approved = 'yes'
WHERE U_Approved IS NULL

That should get everything on track.

Sponsored Links
Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
Results from your SQL command

Here are the results of your command: "SELECT COUNT(*) FROM w3t_Users WHERE U_Approved = 'yes'".
COUNT(*)
774





Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
I just tried this, JoshPet, it didn't seem to change anything.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
This may not help, but here's a more efficient way of seeing what's in the U_Approved column:

SELECT U_Approved,COUNT(U_Approved) FROM w3t_Users GROUP BY U_Approved

Joined: Apr 2001
Posts: 59
Junior Member
Junior Member
Offline
Joined: Apr 2001
Posts: 59
Hi Dave_L,

Here are the results (I don't understand the results):

Results from your SQL command

Here are the results of your command: "SELECT U_Approved,COUNT(U_Approved) FROM w3t_Users GROUP BY U_Approved ".
U_Approved COUNT(U_Approved)
1
9GKPFJYg 1
JGUUd2VX 1
jSbt7hp8 1
K3mJgNS7 1
KxTFQRse 1
N2anc8eF 1
P5QzYQKN 1
Q8dz5YRS 1
Qikofsxt 1
r7gPWMcN 1
tBt7zhY5 1
traTFevW 1
v3Zc32sI 1
yes 774
yIZ7ZfrQ 1
ZHfTvTYY 1

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
That looks normal, except for the first line. I'm guessing that means that there is 1 row with U_Approved = '' (empty string), which probably should be changed to 'yes'. There is one row with U_Approved='9GKPFJYg' (unverified email), one row with U_Approved='JGUUd2VX', ..., 774 rows with U_Approved='yes', etc.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Nettomo
Nettomo
Germany, Bremen
Posts: 417
Joined: November 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)