moonsflyer 4 mesi fa
parent
commit
f9f6126ee9
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      phalapi/src/app/Model/Home.php

+ 4 - 1
phalapi/src/app/Model/Home.php

@@ -154,14 +154,17 @@ class Home extends NotORM{
     public function getClassidShopLists($type,$province,$name,$p){
 
         $where['type'] = $type;
+        $where2 = "type={$type} ";
         if(!empty($province)){
             $where['province'] = $province;
+            $where2 .="and province='{$province}' ";
         }
         if(!empty($name)){
 //            $where['province'] = $province;
 //            $where .= " and name like '%{$name}%' " ;  user_nickname like '%{$key}%'
+            $where2 .=" and name like '%{$name}%' ";
         }
-        $where2 = "type={$type} and province='{$province}' ";
+
         $info=\App\getClassidShopLists($where2,$name,$p);
         return $info;
     }