Пример #1
0
function execQueryPaginator($query_name, $params)
{
    $lines_number = execQueryCount($query_name, $params);
    return modApiFunc('paginator', 'getQueryLimits', $lines_number);
}
 /**
  * Executes SQL query, which returns the product number in the current
  * category.
  *
  * The product number, which will be returned, depends on the current zone.
  * If the current zone is Customer Zone, then it will be calculated only the
  * products, which:
  * - attribute Available is installed in Yes,
  * - attribute Available is installed in the empty string, (                ,
  *                        ,                       ,     Yes)
  * - attribute Available can't be seen in the product type.
  *
  * If the current zone is Admin Zone, then all products will be calculated.
  *
  * @see CCategoryInfo::_loadProductsNumberInCategory()
  * @param int $calc_mode The constant IN_CATEGORY_ONLY, IN_CATEGORY_RECURSIVELY
  *        or IN_CATEGORY_RECURSIVELY_WITHOUT_CURRENT
  * @return int the number of the products in the current category
  */
 function _loadProductsNumberInCategory($select_mode_recursiveness, $select_mode_uniqueness)
 {
     //           default
     //
     loadClass('CProductListFilter');
     $f = new CProductListFilter();
     $params = $f->getProductListParamsObject();
     //                 default            "      "
     $params->category_id = $this->_fCategoryID;
     $params->select_mode_recursiveness = $select_mode_recursiveness;
     $params->select_mode_uniqueness = $select_mode_uniqueness;
     return execQueryCount('SELECT_PRODUCT_LIST', $params->getParams());
 }
Пример #3
0
 /**
  * Returns the number of labels by the filter
  */
 function searchLabelCount($search_filter)
 {
     return execQueryCount('SELECT_LABELS_BY_FILTER', $search_filter);
 }