本文整理汇总了PHP中search::attributeSearch方法的典型用法代码示例。如果您正苦于以下问题:PHP search::attributeSearch方法的具体用法?PHP search::attributeSearch怎么用?PHP search::attributeSearch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类search
的用法示例。
在下文中一共展示了search::attributeSearch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: search
<?php
include "conf/config.inc.php";
$value = $_POST['value'];
$attribute = $_POST['attr'];
$manufac = $_POST['manufact'];
$classname = $_POST["class"];
if ($classname == "") {
$classname = "customStyleSelectBox";
}
$search = new search();
$com = new common();
if ($attribute == "manufacturer") {
$dataArray = array("{$attribute}" => $value);
$carid = $search->attributeSearch($dataArray, "");
$set = implode(",", $carid);
$returnvalue = '<select class="' . $classname . '" id="model" name="model" onchange="ajaxcall(this.value,\'model\',\'year\',' . $value . ')">';
$returnvalue .= "<option value=''>Modèles</option>";
//echo "Select DISTINCT(value) from car_varchar where attribute_id = '4' and FIND_IN_SET(car_id, '".$set."') order by value";
$year = $com->CustomQuery("Select DISTINCT(value) from car_varchar where attribute_id = '4' and FIND_IN_SET(car_id, '" . $set . "') order by value");
while ($yrow = mysql_fetch_object($year)) {
$returnvalue .= "<option value='" . $yrow->value . "'>" . $yrow->value . "</option>";
}
$returnvalue .= '</select>';
echo $returnvalue;
}
if ($attribute == "model") {
$dataArray = array("{$attribute}" => $value, "manufacturer" => $manufac);
$carid = $search->attributeSearch($dataArray, "");
$set = implode(",", $carid);
$returnvalue = '<select class="' . $classname . '" name="madeYear" id="madeYear">';
示例2: Paginator
$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();
$cars = $search->attributeSearch($dataArray, $groupby, 'ASC', $pages->limit);
} else {
$total_rows = $search->attributeSearchCount($dataArray);
示例3: 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);