public static function getUsersOnline() { $mysql = new Gio_Db_Mysql(); $sql = 'SELECT * FROM ' . $mysql->_tablePrefix . 'core_session AS s WHERE status = "active" AND data != ""'; $rs = $mysql->query($sql); $sessions = array(); while ($row = $mysql->fetchAll($rs)) { $sessions[] = $row; } /** * Free result */ $mysql->freeResult($rs); return $sessions; }