把他的sql查询的写死的变量, 你用搜索穿过的替换掉就可以了啊,
sql的 where根据筛选条件改变而改变,举个例子:
第三版升级内容:1、增加了分类可以自定义分类名称的颜色和粗体显示 搜索引擎优化。2、增加了商品搜索引擎优化和相关文章添加3、增加了配套商品的添加4、增加了前台商品列表按照分类、属性、品牌、价格范围进行筛选5、增加了商品的配件功能6、增加了分类的批量删除7、增加了商品扩展属性在前台的显示关闭方式8、增加了商品具体显示页商品编码和打折商品图标显示形式9、增加了最近浏览商品功能10、增加了非会员直接购物
$filter['brand'] = isset($_REQUEST['brand']) ? trim($_REQUEST['brand']) : '';//品牌
$filter['price'] = isset($_REQUEST['price']) ? trim($_REQUEST['price']) : '';//价格
$filter['attribute'] = isset($_REQUEST['attribute']) ? trim($_REQUEST['attribute']) : '';//属性
$where = " WHERE 1";
if($filter['brand'] != ''){
$where .= " AND brand=" . addslashes($filter['brand']);
}
if($filter['price'] != ''){
$where .= " AND price=" . addslashes($filter['price']);
}
if($filter['attribute'] != ''){
$where .= " AND attribute=" . addslashes($filter['attribute']);
}









