You are here

function _drd_server_count_session in Drupal Remote Dashboard Server 6.2

Same name and namespace in other branches
  1. 7.2 drd_server.module \_drd_server_count_session()

Parameters

int $timestamp:

bool $anonymous:

Return value

int

1 call to _drd_server_count_session()
drd_server_heartbeat in ./drd_server.module

File

./drd_server.module, line 979

Code

function _drd_server_count_session($timestamp = 0, $anonymous = TRUE) {
  if ($anonymous) {
    return sess_count($timestamp);
  }
  else {
    return db_result(db_query("SELECT COUNT(DISTINCT uid) FROM {sessions} WHERE uid > 0 AND timestamp >= %d", $timestamp));
  }
}