PDA

View Full Version : Last user to register bug...



WebStyles
Tue 2nd May '00, 8:16am
Ok, not sure if this is a bug or not... Or if something got messed up when we imported our UBB info. We noticed that the member count went up by 2, and the thread/reply counts were a little "padded" as well. When we upgraded to 1.1.1 today, that all fixed itself. Unfortunately, the welcome to our newest member, username! displays the wrong member now. I found the query that finds the newest member, SELECT username,userid FROM user WHERE userid=$numbermembers. It looks like it will always be 2 behind now. Is there any way to fix this?

John
Wed 3rd May '00, 2:59am
Hmmm. I'm not exactly sure why it should be doing that, but try this code instead:



$getnewestusers=$DB_site->query_first("SELECT username,userid FROM user ORDER BY joindate DESC LIMIT 1");


John

werehere
Wed 3rd May '00, 3:42am
This bit of code did not work. It dropped the member number displayed down 17 member numbers, where before it was only 2.

Hope that made sense:)

TB2
Thu 25th May '00, 1:51am
421 Users registered

Let's have a look at my table "user":

I have entries for users with the id:

1 exists
2 to 5 doesn't exist
6 exists
7 to 24 doesn't exist
25 to 419 exists

The last member owns the userid 442 !

vB shows in the forumhome as last member the data of member 421 instead of 442 .... i think cause it simply counts the amount of entries in the table "user" and adds the name and link of the my member 421 (the real amount of members) instead of the last entry in the table ....

How could i fix this?

Should vB offers something like "Renumber members" in the controlpanel?

John
Thu 25th May '00, 2:01am
This is fixed in the next version. Until then, you can use that code above.

John

werehere
Thu 25th May '00, 2:08am
WE ended up using


$query = "select * from user order by userid desc limit 1";

in replacement to the SQL query that john suggested.

Rick Horwitz
Mon 29th May '00, 6:38pm
What file is that code go into?

Moonwolf
Mon 29th May '00, 11:27pm
Originally posted by Rick Horwitz
What file is that code go into?

forum/index.php

Find on Line 90:



$getnewestusers=$DB_site->query_first("SELECT username,userid FROM user WHERE userid=$numbermembers");


That's the one you need to change, to which-ever version above you want :)

Katherine

werehere
Tue 30th May '00, 12:45am
When we used Johns version it was seriously off for some reason, but that one I posted seemed to fix all problems with our last registered members:)