本文整理汇总了PHP中CDBResult::SelectedRowsCount方法的典型用法代码示例。如果您正苦于以下问题:PHP CDBResult::SelectedRowsCount方法的具体用法?PHP CDBResult::SelectedRowsCount怎么用?PHP CDBResult::SelectedRowsCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDBResult
的用法示例。
在下文中一共展示了CDBResult::SelectedRowsCount方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CDBResultToArray
/**
* Convert CDBResult to array.
*
*/
public static function CDBResultToArray(CDBResult $CDBResult)
{
if ($CDBResult->SelectedRowsCount() == 0) {
return array();
}
$ret = array();
while ($row = $CDBResult->Fetch()) {
$ret[] = $row;
}
return $ret;
}
示例2: getSelectedRowsCount
/** @return Int */
public function getSelectedRowsCount()
{
if ($this->resource) {
return $this->resource->getSelectedRowsCount();
} elseif ($this->resourceCDBResult) {
if (!$this->resourceCDBResult instanceof \CDBResultMysql) {
$this->resourceCDBResult->NavStart(0);
}
return $this->resourceCDBResult->SelectedRowsCount();
}
return 0;
}
示例3: intval
$countQuery->addSelect(new \Bitrix\Main\Entity\ExpressionField('CNT', 'COUNT(1)'));
$countQuery->setFilter($filter);
$totalCount = $countQuery->setLimit(null)->setOffset(null)->exec()->fetch();
$totalCount = intval($totalCount['CNT']);
if (!$_GET['SHOWALL_1']) {
$totalPage = ceil($totalCount / $limit);
$result->NavStart($limit);
} else {
$totalPage = 1;
$result->NavStart();
}
$result->NavRecordCount = $totalCount;
$result->NavPageCount = $totalPage;
$result->NavPageNomer = $page;
$arResult["NAV_OBJECT"] = $result;
$arResult["ROWS_COUNT"] = $result->SelectedRowsCount();
$arResult["ELEMENTS_ROWS"] = array();
$arAvailableStatuses = array("200", "304", "603", "404", "486", "503", "480", "402", "1", "2", "3");
$bModuleCatalog = false;
if (CModule::IncludeModule("catalog")) {
$bModuleCatalog = true;
}
$arUserIds = array();
$portalNumbers = CVoxImplantConfig::GetPortalNumbers();
while ($data = $result->fetch()) {
$data = CVoxImplantHistory::PrepereData($data);
if ($data["PORTAL_USER_ID"] > 0 && !in_array($data["PORTAL_USER_ID"], $arUserIds)) {
$arUserIds[] = $data["PORTAL_USER_ID"];
}
if (in_array($data["CALL_FAILED_CODE"], array(1, 2, 3, 409))) {
$data["CALL_FAILED_REASON"] = GetMessage("TELEPHONY_STATUS_" . $data["CALL_FAILED_CODE"]);
示例4: htmlspecialcharsex
} else {
if ($arProperty["PROPERTY_TYPE"] == "L") {
$arPropertyValues[$arElement['ID']][$propID][] = htmlspecialcharsex($arProperty["VALUE_ENUM"]);
} else {
$arPropertyValues[$arElement['ID']][$propID][] = htmlspecialcharsex($arProperty["VALUE"]);
}
}
}
unset($rsProperties, $arProperty, $propID);
}
}
}
$arResult['PROPERTY_VALUES'] = $arPropertyValues;
unset($arPropertyValues);
CCrmProduct::ObtainPricesVats($arResult['PRODUCTS'], $arProductId, $arPricesSelect, $arVatsSelect, isset($arFilter['~REAL_PRICE']) && $arFilter['~REAL_PRICE'] === true);
$productMeasureInfos = \Bitrix\Crm\Measure::getProductMeasures($arProductId);
if (!is_array($productMeasureInfos)) {
$productMeasureInfos = array();
}
$arResult['PRODUCT_MEASURE_INFOS'] = $productMeasureInfos;
// <-- PRODUCTS
$arResult['ROWS_COUNT'] = $obRes->SelectedRowsCount();
$arResult['NAV_OBJECT'] = $obRes;
$arResult['BACK_URL_SECTION_ID'] = $bFilterSection ? $sectionID : '';
$this->IncludeComponentTemplate();
include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/crm.product/include/nav.php';
$result = array('ROWS_COUNT' => $arResult['ROWS_COUNT']);
if ($bFilterSection) {
$result['SECTION_ID'] = $sectionID;
}
return $result;