当前位置: 首页>>代码示例>>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;未经允许,请勿转载。