Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
m-weisel2
Regular
Regular



Joined: May 22, 2005
Posts: 78

PostPosted: Mon Jun 27, 2005 11:05 pm Reply with quote

all of my Registered members is off because they count the tables in the $prefix_users table and on is anonymous and it counts that so instead of 9 I get 10 my way of fixing this is after the )) at the end of the query I add " - 1" and that works but when I update these file like statistics and so on it puts it back without the "- 1" anyway I want to know how to fix this so I don't have to correct every page.


MAx

_________________
Image

Free XBOX 360 
View user's profile Send private message
Manuel
Regular
Regular



Joined: May 28, 2005
Posts: 90

PostPosted: Mon Jun 27, 2005 11:24 pm Reply with quote

sorry but you must edit all queries like this (block-user_info.php):

Code:


$numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM $user_prefix"._users.""));


you'll find this error in many modules & blocks... to correct it you can modify the query:

Code:


$numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM ".$user_prefix."_users WHERE user_id > 1"));


or

Code:


$numrows = $db->sql_numrows($db->sql_query("SELECT user_id FROM ".$user_prefix."_users WHERE username IS NOT 'Anonymous'"));


or just add -1 like you Wink
note that you have the code also in your signature lol Smile !

_________________
Image 
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Jun 28, 2005 6:28 am Reply with quote

Although there aren't that many queries that have to be changed, why does it really matter? It seems it's easier just to subtract 1 in your head when you see the number. Most sites have members that never come back after 1 or 2 times so the membership numbers are not usually that accurate anyway. Just my opinion:wink:
 
View user's profile Send private message
Manuel







PostPosted: Tue Jun 28, 2005 10:46 am Reply with quote

yes, but you know that we are precision maniac lol
 
m-weisel2







PostPosted: Tue Jun 28, 2005 12:51 pm Reply with quote

yeah I am
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©