View Single Post
  #9  
Old 08-27-2011, 11:36 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 598,402
Hall of Famer is on a distinguished road
Default

Well I am offering one possible solution, not sure if it works since I have never encountered this glitch myself on demo site(makes sense though, there is usually only me on demo site).

Go to your inc/functions.php file and find this:

PHP Code:
if($isloggedin != "yes")

{

    
$loggedinname "Visitor";

}



$result runquery("SELECT * FROM ".$GLOBALS['prefix']."online WHERE `session` = '".$session."'");

$count mysql_num_rows($result);

if(
$count == 0)

{

    
runquery("INSERT INTO ".$GLOBALS['prefix']."online VALUES('$loggedinname', '$session', '$time')");


Replace with:
PHP Code:
$result runquery("SELECT * FROM {$GLOBALS['prefix']}online WHERE `session` = '{$session}'");

$count mysql_num_rows($result);

$result2 runquery("SELECT * FROM {$GLOBALS['prefix']}online WHERE `username` = '{$loggedinname}'");

$count2 mysql_num_rows($result2);

if(
$isloggedin != "yes")

{

    
$loggedinname "Visitor";

}

if(
$count == and $count2 == 0)

{

    
runquery("INSERT INTO {$GLOBALS['prefix']}online VALUES('$loggedinname', '$session', '$time')");


This way it should fix the problem of same user appearing more than once from who's online page. Again I cant tested this myself with only me on demo site, so run it on your active site with members and see if it works. It will not be included in Mys v1.2.3, so Id recommend you to upgrade before fixing this.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote