CBlogComment :: GetByID: Bitrix method

      
<?php 
//  CBlogComment :: GetByID()
//  /dist/bitrix/modules/blog/general/blog_comment.php:173

    
public static function GetByID($ID)
    {
        global 
$DB;

        
$ID IntVal($ID);

        if (isset(
$GLOBALS["BLOG_COMMENT"]["BLOG_COMMENT_CACHE_".$ID]) && is_array($GLOBALS["BLOG_COMMENT"]["BLOG_COMMENT_CACHE_".$ID]) && is_set($GLOBALS["BLOG_COMMENT"]["BLOG_COMMENT_CACHE_".$ID], "ID"))
        {
            return 
$GLOBALS["BLOG_COMMENT"]["BLOG_COMMENT_CACHE_".$ID];
        }
        else
        {
            
$strSql =
                
"SELECT C.ID, C.BLOG_ID, C.POST_ID, C.PARENT_ID, C.AUTHOR_ID, C.AUTHOR_NAME, ".
                
"    C.AUTHOR_EMAIL, C.AUTHOR_IP, C.AUTHOR_IP1, C.TITLE, C.POST_TEXT, ".
                
"    ".$DB->DateToCharFunction("C.DATE_CREATE""FULL")." as DATE_CREATE, ".
                
"    C.PUBLISH_STATUS, C.PATH, C.SHARE_DEST ".
                
"FROM b_blog_comment C ".
                
"WHERE C.ID = ".$ID."";
            
$dbResult $DB->Query($strSqlFalse"File: ".__FILE__."<br>Line: ".__LINE__);
            if (
$arResult $dbResult->Fetch())
            {
                
$GLOBALS["BLOG_COMMENT"]["BLOG_COMMENT_CACHE_".$ID] = $arResult;
                return 
$arResult;
            }
        }

        return 
False;
    }