|
@@ -244,12 +244,27 @@ class Reciveremote extends Base
|
|
|
if(empty($v)){
|
|
|
break;
|
|
|
}
|
|
|
- $queryWhere.= " and `e`.`exam_class` in ?";
|
|
|
- $ex = implode("', '", $v);
|
|
|
- $val = "('".$ex."')";
|
|
|
- // $where .= " and e.exam_class in ('".$ex."')";
|
|
|
- $options[] = $val;
|
|
|
- var_dump($val);
|
|
|
+ $length = sizeof($v);
|
|
|
+ if($length === 1) {
|
|
|
+ $queryWhere.= " and `e`.`exam_class` = ?";
|
|
|
+ $options[] = $v[0];
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ $index = 1;
|
|
|
+ $queryWhere.= " and (`e`.`exam_class` = ?";
|
|
|
+ $options[] = $v[0];
|
|
|
+ while($index < $length) {
|
|
|
+ $queryWhere.= " or `e`.`exam_class` = ?";
|
|
|
+ $options[] = $v[$index];
|
|
|
+ $index++;
|
|
|
+ }
|
|
|
+ $queryWhere.= ')';
|
|
|
+ // $queryWhere.= " and `e`.`exam_class` in ?";
|
|
|
+ // $ex = implode("or `e`.`exam_class` = ", $v);
|
|
|
+ // $val = "('".$ex."')";
|
|
|
+ // // $where .= " and e.exam_class in ('".$ex."')";
|
|
|
+ // $options[] = $val;
|
|
|
+ // var_dump($val);
|
|
|
break;
|
|
|
case 'name':
|
|
|
$queryWhere.= " and `pi`.`name` like ?";
|