作者 邓超

x

@@ -170,13 +170,15 @@ function dbWhere(array $where, string $ar = 'and'):string{ @@ -170,13 +170,15 @@ function dbWhere(array $where, string $ar = 'and'):string{
170 if(count($v)===1){ 170 if(count($v)===1){
171 if($t=='notin'){ 171 if($t=='notin'){
172 $sql[] = "{$f} != ".$v[0]; 172 $sql[] = "{$f} != ".$v[0];
  173 + }elseif($t){
  174 + $sql[] = "{$f} {$t} ".$v[0];
173 }else{ 175 }else{
174 // 只有一个值时就是 = 176 // 只有一个值时就是 =
175 $sql[] = "{$f} = ".$v[0]; 177 $sql[] = "{$f} = ".$v[0];
176 } 178 }
177 179
178 }elseif (count($v) > 1){ 180 }elseif (count($v) > 1){
179 - $sql[] = "{$f} ".($t=='notin'?'not in':'in')." (".implode(',',$v).")"; 181 + $sql[] = "{$f} ".($t=='notin'?'not in':($t?:'in'))." (".implode(',',$v).")";
180 } 182 }
181 183
182 }else{ 184 }else{