本文整理汇总了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);
}
示例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;
}
}
示例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;
}
}
示例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();
}
}
示例5: __construct
public function __construct($res)
{
parent::CDBResult($res);
}
示例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);
}
示例7: _CMailLogDBRes
public static function _CMailLogDBRes($res)
{
parent::CDBResult($res);
}
示例8: __construct
public function __construct($res, $useGZipCompression)
{
$this->useGZipCompression = $useGZipCompression;
parent::CDBResult($res);
}
示例9: CCatalogMeasureResult
/**
* @param $res
*/
public static function CCatalogMeasureResult($res)
{
parent::CDBResult($res);
}
示例10:
function _CMailLogDBRes($res)
{
parent::CDBResult($res);
}
示例11: CDBResultWebDAVFiles
function CDBResultWebDAVFiles($res)
{
parent::CDBResult($res);
}
示例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);
}
示例13: CStatResult
public static function CStatResult($res)
{
parent::CDBResult($res);
}
示例14: CIBlockResult
public static function CIBlockResult($res)
{
parent::CDBResult($res);
}
示例15: CStatResult
function CStatResult($res)
{
parent::CDBResult($res);
}