- Модуль: statistic
- Путь к файлу: ~/bitrix/modules/statistic/classes/mysql/statevent.php
- Класс: CStatEvent
- Вызов: CStatEvent::GetListByGuest
static function GetListByGuest($GUEST_ID, $EVENT_ID=false, $EVENT3=false, $SEC=false)
{
$err_mess = "File: ".__FILE__."
Line: ";
$DB = CDatabase::GetModuleConnection('statistic');
$strSqlSearch = "";
if ($EVENT_ID!==false)
$strSqlSearch .= " and E.EVENT_ID='".intval($EVENT_ID)."' ";
if ($EVENT3!==false)
$strSqlSearch .= " and E.EVENT3='".$DB->ForSql($EVENT3,255)."' ";
if ($SEC!==false)
$strSqlSearch .= " and E.DATE_ENTER > DATE_ADD(now(),INTERVAL - ".intval($SEC)." SECOND) ";
$strSql = "
SELECT
E.ID
FROM
b_stat_event_list E
WHERE
E.GUEST_ID = ".intval($GUEST_ID)."
".$strSqlSearch."
";
$res = $DB->Query($strSql, false, $err_mess.__LINE__);
return $res;
}