I have the table with fields id,before_value,after_value.I have the array value for parent_id ('11')
I want to get the value in below constraints
before value is OINandafter value is MGLafter value is MGLandbefore value is not OINandparent id is in my array ('11','18');
3 before value is MGL and after value is MQL
I have tried as
$audit_table_result=$audit_table_result->orWhere(function ($query) use ($meeting_ids){
return $query->where('after_value_string','=','MGL')->whereNotIn('before_value_string',['OIB'])->whereIn('parent_id',['11','18']);
})->orWhere(function ($query) {
return $query->where('before_value_string','=','MGL')
->where('after_value_string','=','MQL');
})->orWhere(function ($query) {
return $query->where('before_value_string','=','OIB')
->where('after_value_string','=','MGL');
})->where('parent_id',$added_id)
->get();
I expected to get the id 1,3,4,5 but I'm getting 1,2,3,4,5,6
via Chebli Mohamed

Aucun commentaire:
Enregistrer un commentaire