Location: PHPKode > projects > pmchat > pmchat/mylib.inc
<?
function getUserList($userid)
{
$query="select * from UserStatus where ACTIVE=1 and USERID!=".$userid;
$res=mysql_query($query);

$usernames="";
$userids="";

while($row=mysql_fetch_array($res))
{
        if($usernames=="" && $userids=="")
        {
                $usernames=$row['USERNAME'];
                $userids=$row['USERID'];
        }
        else
        {
                $usernames=$usernames.",".$row['USERNAME'];
                $userids=$userids.",".$row['USERID'];
        }
}//while

//$scrpt="<script language='javascript'>parent.updateUserList('".$userids."','".$usernames."')</script>";

return $userids;
}
?>

Return current item: pmchat