public static function GetObjectRequestCount($p_objectId) { global $g_ado_db; $p_objectId = 0 + $p_objectId; $sql = "SELECT SUM(request_count) FROM RequestStats " . "WHERE object_id = {$p_objectId}"; return $g_ado_db->GetOne($sql); }
public function updateRequestCount() { global $g_ado_db; if (!$this->exists()) { return false; } $objectRequestCount = RequestStats::GetObjectRequestCount($this->getObjectId()); return $this->setProperty('request_count', $objectRequestCount); }