本文整理汇总了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__);