當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CDBResult::CDBResult方法代碼示例

本文整理匯總了PHP中CDBResult::CDBResult方法的典型用法代碼示例。如果您正苦於以下問題:PHP CDBResult::CDBResult方法的具體用法?PHP CDBResult::CDBResult怎麽用?PHP CDBResult::CDBResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CDBResult的用法示例。


在下文中一共展示了CDBResult::CDBResult方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

 function __construct(Entity $entity, \CDBResult $DBResult = null)
 {
     if ($entity instanceof Entity) {
         $this->_obxDBSimpleEntity = $entity;
     } else {
         throw new \ErrorException(__CLASS__ . ': entity object not set');
     }
     parent::CDBResult($DBResult);
 }
開發者ID:OpenBX,項目名稱:obx.core,代碼行數:9,代碼來源:dbresult.php

示例2: Search

	function Search($phrase = "", $nTopCount = 5, $arParams = array(), $bNotFilter = false, $order = "")
	{
		$DB = CDatabase::GetModuleConnection('search');
		$this->_arPhrase = stemming_split($phrase, LANGUAGE_ID);
		if(!empty($this->_arPhrase))
		{
			$nTopCount = intval($nTopCount);
			if($nTopCount <= 0)
				$nTopCount = 5;

			$arId = CSearchFullText::GetInstance()->searchTitle($phrase, $this->_arPhrase, $nTopCount, $arParams, $bNotFilter, $order);
			if (!is_array($arId))
			{
				return $this->searchTitle($phrase, $nTopCount, $arParams, $bNotFilter, $order);
			}
			elseif (!empty($arId))
			{
				$strSql = "
					SELECT
						sc.ID
						,sc.MODULE_ID
						,sc.ITEM_ID
						,sc.TITLE
						,sc.PARAM1
						,sc.PARAM2
						,sc.DATE_CHANGE
						,L.DIR
						,L.SERVER_NAME
						,sc.URL as URL
						,scsite.URL as SITE_URL
						,scsite.SITE_ID
						,if(locate('".$DB->ForSQL(ToUpper($phrase))."', upper(sc.TITLE)) > 0, 1, 0) RANK1
					FROM
						b_search_content sc
						INNER JOIN b_search_content_site scsite ON sc.ID = scsite.SEARCH_CONTENT_ID
						INNER JOIN b_lang L ON scsite.SITE_ID = L.LID
					WHERE
						sc.ID in (".implode(",", $arId).")
						and scsite.SITE_ID = '".SITE_ID."'
					ORDER BY ".(
						$bOrderByRank?
							"RANK1 DESC, TITLE":
							"DATE_CHANGE DESC, RANK1 DESC, TITLE"
					)."
				";

				$r = $DB->Query($DB->TopSql($strSql, $nTopCount+1));
				parent::CDBResult($r);
				return true;
			}
		}
		else
		{
			return false;
		}
	}
開發者ID:ASDAFF,項目名稱:entask.ru,代碼行數:56,代碼來源:title.php

示例3: Search

 function Search($phrase = "", $nTopCount = 5, $arParams = array(), $bNotFilter = false, $order = "")
 {
     $DB = CDatabase::GetModuleConnection('search');
     $this->_arPhrase = stemming_split($phrase, LANGUAGE_ID);
     if (!empty($this->_arPhrase)) {
         $nTopCount = intval($nTopCount);
         if ($nTopCount <= 0) {
             $nTopCount = 5;
         }
         $arId = CSearchFullText::GetInstance()->searchTitle($phrase, $this->_arPhrase, $nTopCount, $arParams, $bNotFilter, $order);
         if (!is_array($arId)) {
             return $this->searchTitle($phrase, $nTopCount, $arParams, $bNotFilter, $order);
         } elseif (!empty($arId)) {
             $strSql = "\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tsc.ID\n\t\t\t\t\t\t,sc.MODULE_ID\n\t\t\t\t\t\t,sc.ITEM_ID\n\t\t\t\t\t\t,sc.TITLE\n\t\t\t\t\t\t,sc.PARAM1\n\t\t\t\t\t\t,sc.PARAM2\n\t\t\t\t\t\t,sc.DATE_CHANGE\n\t\t\t\t\t\t,L.DIR\n\t\t\t\t\t\t,L.SERVER_NAME\n\t\t\t\t\t\t,sc.URL as URL\n\t\t\t\t\t\t,scsite.URL as SITE_URL\n\t\t\t\t\t\t,scsite.SITE_ID\n\t\t\t\t\t\t," . $this->getRankFunction($phrase) . " RANK1\n\t\t\t\t\tFROM\n\t\t\t\t\t\tb_search_content sc\n\t\t\t\t\t\tINNER JOIN b_search_content_site scsite ON sc.ID = scsite.SEARCH_CONTENT_ID\n\t\t\t\t\t\tINNER JOIN b_lang L ON scsite.SITE_ID = L.LID\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tsc.ID in (" . implode(",", $arId) . ")\n\t\t\t\t\t\tand scsite.SITE_ID = '" . SITE_ID . "'\n\t\t\t\t\tORDER BY " . $this->getSqlOrder($bOrderByRank) . "\n\t\t\t\t";
             $r = $DB->Query($DB->TopSql($strSql, $nTopCount + 1));
             parent::CDBResult($r);
             return true;
         }
     } else {
         return false;
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:22,代碼來源:title.php

示例4: CCrmProductResult

 function CCrmProductResult($res, $arFields = array(), $arAdditionalFilter = array(), $arAdditionalSelect = array(), $arOptions = array())
 {
     parent::CDBResult($res);
     $fields = $arFields;
     foreach ($fields as $k => $v) {
         $str = strval($v);
         if (trim($str) === '') {
             unset($fields[$k]);
         }
     }
     $this->arFieldAssoc = array_flip($fields);
     $this->arAdditionalFilter = $arAdditionalFilter;
     $this->arAdditionalSelect = $arAdditionalSelect;
     $this->bRealPrice = false;
     if (is_array($arOptions) && count($arOptions) > 0) {
         if (isset($arOptions['REAL_PRICE']) && $arOptions['REAL_PRICE'] === true) {
             $this->bRealPrice = true;
         }
     }
     self::$bVatMode = CCrmTax::isVatMode();
     if (self::$bVatMode) {
         self::$arVatRates = CCrmVat::GetAll();
     }
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:24,代碼來源:crm_product_result.php

示例5: __construct

 public function __construct($res)
 {
     parent::CDBResult($res);
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:4,代碼來源:taskservice.php

示例6: array

 function _CMessageDBResult($res, $params = array())
 {
     $this->sNameTemplate = !empty($params["sNameTemplate"]) ? $params["sNameTemplate"] : '';
     $this->checkUserFields = false;
     $this->arUserFields = false;
     if (array_key_exists("SELECT", $params)) {
         $this->arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("FORUM_MESSAGE", 0, LANGUAGE_ID);
         $this->checkUserFields = !empty($this->arUserFields);
     }
     parent::CDBResult($res);
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:11,代碼來源:message.php

示例7: _CMailLogDBRes

 public static function _CMailLogDBRes($res)
 {
     parent::CDBResult($res);
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:4,代碼來源:mail.php

示例8: __construct

 public function __construct($res, $useGZipCompression)
 {
     $this->useGZipCompression = $useGZipCompression;
     parent::CDBResult($res);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:5,代碼來源:workflowtemplateloader.php

示例9: CCatalogMeasureResult

 /**
  * @param $res
  */
 public static function CCatalogMeasureResult($res)
 {
     parent::CDBResult($res);
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:7,代碼來源:measure.php

示例10:

	function _CMailLogDBRes($res)
	{
		parent::CDBResult($res);
	}
開發者ID:ASDAFF,項目名稱:1C_Bitrix_info_site,代碼行數:4,代碼來源:mail.php

示例11: CDBResultWebDAVFiles

 function CDBResultWebDAVFiles($res)
 {
     parent::CDBResult($res);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:4,代碼來源:file.php

示例12: array

 function _CTopicDBResult($res, $params = array())
 {
     $this->sNameTemplate = !empty($params["sNameTemplate"]) ? $params["sNameTemplate"] : '';
     $this->noFilter = array_key_exists('NoFilter', $params) && $params['NoFilter'] === true;
     parent::CDBResult($res);
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:6,代碼來源:topic.php

示例13: CStatResult

 public static function CStatResult($res)
 {
     parent::CDBResult($res);
 }
開發者ID:rasuldev,項目名稱:torino,代碼行數:4,代碼來源:statresult.php

示例14: CIBlockResult

 public static function CIBlockResult($res)
 {
     parent::CDBResult($res);
 }
開發者ID:andy-profi,項目名稱:bxApiDocs,代碼行數:4,代碼來源:iblockresult.php

示例15: CStatResult

 function CStatResult($res)
 {
     parent::CDBResult($res);
 }
開發者ID:DarneoStudio,項目名稱:bitrix,代碼行數:4,代碼來源:statresult.php


注:本文中的CDBResult::CDBResult方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。