本文整理汇总了PHP中search::attributeSearchCount方法的典型用法代码示例。如果您正苦于以下问题:PHP search::attributeSearchCount方法的具体用法?PHP search::attributeSearchCount怎么用?PHP search::attributeSearchCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::attributeSearchCount方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Paginator
$orderfield = '<input type="hidden" name="sort" value="' . $orderBy[0] . '~' . $orderBy[1] . '">';
$apicall .= $order;
}
$apicall .= $where;
//echo $apicall;die;
// Load the call and capture the document returned by eBay API
$resp = simplexml_load_file($apicall);
$ebay_total = (int) $resp->paginationOutput->totalEntries;
$pages = new Paginator();
$pages->items_per_page = 110;
$pages->current_page = $fillfor;
if (count($dataArray) >= 1) {
if ($groupby != "" && $sort != "") {
$order = explode("~", $sort);
$orderby = $groupby . "," . $order[0];
$total_rows = $search->attributeSearchCount($dataArray, $groupby);
$pages->items_total += $total_rows;
$pages->paginate();
$cars = $search->attributeSearch($dataArray, $orderby, $order[1], $pages->limit);
} else {
if ($groupby == "" && $sort != "") {
$order = explode("~", $sort);
$total_rows = $search->attributeSearchCount($dataArray, $groupby);
$pages->items_total += $total_rows;
$pages->paginate();
$cars = $search->attributeSearch($dataArray, $order[0], $order[1], $pages->limit);
} else {
if ($groupby != "" && $sort == "") {
$total_rows = $search->attributeSearchCount($dataArray, $groupby);
$pages->items_total += $total_rows;
$pages->paginate();
示例2: search
$obj_search = new search();
if (isset($_GET['field']) and $_GET['field'] != '') {
$field = $_GET['field'];
} else {
$field = 'car_id';
}
if (isset($_GET['orderBy']) and $_GET['orderBy'] != '') {
$orderby = $_GET['orderBy'];
} else {
$orderby = 'ASC';
}
$addCarToQuery = '';
$dataArr = array("featured" => 169);
if ($submitcar == 'Search') {
$backtype = explode("~", $searchattr);
if ($backtype[2] == "select" or $backtype[2] == "radio" or $backtype[2] == "multiselect" or $backtype[2] == "checkbox") {
$value_id = $obj_setting->customQuery("select value_id from attribute_option_value where attribute_id = '" . $backtype['0'] . "' and value like '" . "%" . $searchcar . "%" . "' ");
$value_id = mysql_fetch_object($value_id);
$value = $value_id->value_id;
} else {
$value = $searchcar;
}
$attribute_code = $obj_setting->customQuery("select attribute_code from attribute where attribute_id = " . $backtype['0']);
$attribute_code = mysql_fetch_object($attribute_code);
$dataArr[$attribute_code->attribute_code] = $value;
}
$pages->items_total = $obj_search->attributeSearchCount($dataArr);
$total_rows = $pages->items_total;
$pages->paginate();
$all_car = $obj_search->attributeSearch($dataArr, "fullName", "ASC", $pages->limit);
$all_car = $obj_setting->CarAttributesFromID($all_car);