fix method query
This commit is contained in:
parent
ee3dcc05a0
commit
3b7d478635
@ -55,15 +55,13 @@ switch ($action) {
|
||||
->where('type', $tp);
|
||||
if (count($mts) > 0) {
|
||||
if (count($mts) != count($methods)) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
}
|
||||
}
|
||||
if (count($rts) > 0) {
|
||||
@ -90,15 +88,13 @@ switch ($action) {
|
||||
}
|
||||
if (count($mts) > 0) {
|
||||
if (count($mts) != count($methods)) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
}
|
||||
}
|
||||
if (count($rts) > 0) {
|
||||
@ -126,17 +122,6 @@ switch ($action) {
|
||||
if (count($plns) > 0) {
|
||||
$query->where_in('plan_name', $plns);
|
||||
}
|
||||
if (count($mts) > 0) {
|
||||
if (count($mts) != count($methods)) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
}
|
||||
}
|
||||
$count = $query->count();
|
||||
if ($count > 0) {
|
||||
$result['datas'][] = $count;
|
||||
@ -173,15 +158,13 @@ switch ($action) {
|
||||
}
|
||||
if (count($mts) > 0) {
|
||||
if (count($mts) != count($methods)) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w = [];
|
||||
$v = [];
|
||||
foreach ($mts as $mt) {
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
$w[] ='method';
|
||||
$v[] = "$mt - %";
|
||||
}
|
||||
$query->where_likes($w, $v);
|
||||
}
|
||||
}
|
||||
if (count($rts) > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user