CAdvBanner :: CleanUpDynamics: Bitrix method

      
<?php 
//  CAdvBanner :: CleanUpDynamics()
//  /dist/bitrix/modules/advertising/classes/mysql/advertising.php:948

    
public static function CleanUpDynamics()
    {
        
set_time_limit(0);
        
ignore_user_abort(true);
        
$err_mess = (CAdvBanner::err_mess())."<br>Function: CleanUpDynamics<br>Line: ";
        global 
$DB;
        
$DAYS intval(COption::GetOptionString("advertising""BANNER_DAYS"));
        
$strSql "DELETE FROM b_adv_banner_2_day WHERE to_days(now())-to_days(DATE_STAT)>=$DAYS";
        
$DB->Query($strSqlfalse$err_mess.__LINE__);
        
$strSql "OPTIMIZE TABLE b_adv_banner_2_day";
        
$DB->Query($strSqlfalse$err_mess.__LINE__);
        return 
"CAdvBanner::CleanUpDynamics();";
    }