Example #1
0
 /**
  * Get a list of online users
  * Returns a SELECT mysql result resource
  *
  * @param int $offset
  * @param int $limit
  * @return array 
  */
 public static function GetOnlineUsers($offset = 0, $limit = 20)
 {
     $offset = (int) $offset;
     $limit = (int) $limit;
     $sql = "SELECT * FROM `users` WHERE `is_online` = 1 LIMIT {$offset}, {$limit}";
     $res = mysql_query($sql) or die("Could not get online users" . mysql_error());
     return User::GetUserWrappersFromResult($res);
 }