- Модуль: statistic
- Путь к файлу: ~/bitrix/modules/statistic/classes/general/adv.php
- Класс: CAllAdv
- Вызов: CAllAdv::SetByPage
static function SetByPage($page, &$arrADV, &$ref1, &$ref2, $type="TO")
{
$err_mess = "File: ".__FILE__."
Line: ";
$DB = CDatabase::GetModuleConnection('statistic');
$strSql = "
SELECT
A.ID,
A.REFERER1,
A.REFERER2
FROM
b_stat_adv A
INNER JOIN b_stat_adv_page AP ON (AP.ADV_ID = A.ID and AP.C_TYPE='".$DB->ForSQL($type)."')
WHERE
AP.PAGE is not null
and ".$DB->Length("AP.PAGE")." > 0
and '".$DB->ForSQL($page)."' like ".$DB->Concat("'%'", "AP.PAGE", "'%'")."
";
$w = $DB->Query($strSql, false, $err_mess.__LINE__);
while ($wr=$w->Fetch())
{
$arrADV[] = intval($wr["ID"]);
$ref1 = $wr["REFERER1"];
$ref2 = $wr["REFERER2"];
}
}