...
|
...
|
@@ -170,13 +170,15 @@ function dbWhere(array $where, string $ar = 'and'):string{ |
|
|
if(count($v)===1){
|
|
|
if($t=='notin'){
|
|
|
$sql[] = "{$f} != ".$v[0];
|
|
|
}elseif($t){
|
|
|
$sql[] = "{$f} {$t} ".$v[0];
|
|
|
}else{
|
|
|
// 只有一个值时就是 =
|
|
|
$sql[] = "{$f} = ".$v[0];
|
|
|
}
|
|
|
|
|
|
}elseif (count($v) > 1){
|
|
|
$sql[] = "{$f} ".($t=='notin'?'not in':'in')." (".implode(',',$v).")";
|
|
|
$sql[] = "{$f} ".($t=='notin'?'not in':($t?:'in'))." (".implode(',',$v).")";
|
|
|
}
|
|
|
|
|
|
}else{
|
...
|
...
|
|