当前位置: 首页>>代码示例>>PHP>>正文


PHP CDatabase::IsNull方法代码示例

本文整理汇总了PHP中CDatabase::IsNull方法的典型用法代码示例。如果您正苦于以下问题:PHP CDatabase::IsNull方法的具体用法?PHP CDatabase::IsNull怎么用?PHP CDatabase::IsNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDatabase的用法示例。


在下文中一共展示了CDatabase::IsNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

        if (intval($arLogComment["SOURCE_ID"]) > 0) {
            $log_tmp_id = false;
            $arBlogComment = CBlogComment::GetByID($arLogComment["SOURCE_ID"]);
            if ($arBlogComment) {
                $dbLog = CSocNetLog::GetList(array("ID" => "DESC"), array("EVENT_ID" => "blog_post", "SOURCE_ID" => $arBlogComment["POST_ID"]), false, array("nTopCount" => 1), array("ID", "TMP_ID"));
                if ($arLog = $dbLog->Fetch()) {
                    $log_tmp_id = $arLog["TMP_ID"];
                }
            }
            if (intval($log_tmp_id) > 0) {
                $arFields = array("ENTITY_TYPE" => $arLogComment["ENTITY_TYPE"], "ENTITY_ID" => $arLogComment["ENTITY_ID"], "EVENT_ID" => "blog_comment", "LOG_DATE" => $arLogComment["LOG_DATE"], "MESSAGE" => $arLogComment["MESSAGE"], "TEXT_MESSAGE" => $arLogComment["TEXT_MESSAGE"], "URL" => $arLogComment["URL"], "MODULE_ID" => false, "SOURCE_ID" => $arLogComment["SOURCE_ID"], "LOG_ID" => $log_tmp_id, "USER_ID" => $arLogComment["USER_ID"]);
                CSocNetLogComments::Add($arFields, false, false, false);
                CSocNetLog::Delete($arLogComment["ID"]);
            }
        }
    }
}
$dbLog = CSocNetLog::GetList(array("LOG_DATE" => "ASC"), array("COMMENTS_COUNT" => false), false, false, array("ID", "ENTITY_TYPE", "ENTITY_ID", "LOG_DATE", "MESSAGE", "TEXT_MESSAGE", "URL", "SOURCE_ID", "USER_ID"));
while ($arLog = $dbLog->Fetch()) {
    CSocNetLog::Update($arLog["ID"], array("LOG_UPDATE" => $arLog["LOG_DATE"]));
}
if (IsModuleInstalled("intranet")) {
    $dbResult = CSocNetEventUserView::GetList(array("ENTITY_ID" => "ASC"), array("ENTITY_TYPE" => "N"));
    $arResult = $dbResult->Fetch();
    if (!$arResult) {
        CSocNetEventUserView::Add(array("ENTITY_TYPE" => "N", "ENTITY_ID" => 0, "EVENT_ID" => "news", "USER_ID" => 0, "USER_ANONYMOUS" => "N"));
        CSocNetEventUserView::Add(array("ENTITY_TYPE" => "N", "ENTITY_ID" => 0, "EVENT_ID" => "news_comment", "USER_ID" => 0, "USER_ANONYMOUS" => "N"));
    }
}
$GLOBALS["DB"]->Query("UPDATE b_sonet_log SET LOG_UPDATE = " . CDatabase::IsNull("(SELECT MAX(LOG_DATE) FROM b_sonet_log_comment LC WHERE LC.LOG_ID=b_sonet_log.TMP_ID)", CDatabase::CurrentTimeFunction()), false, $err_mess . __LINE__);
$GLOBALS["DB"]->Query("UPDATE b_sonet_log SET LOG_UPDATE = LOG_DATE WHERE NOT EXISTS (SELECT LC.ID FROM b_sonet_log_comment LC WHERE LC.LOG_ID = b_sonet_log.TMP_ID)", false, $err_mess . __LINE__);
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:updtr1007.php


注:本文中的CDatabase::IsNull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。