Completely untestedI couldn't quite wrap my head around those queries in your last comment, just whatbut instead I thought made sense by checkingtried exploring how Views does between operations. Check out add_where
and set_where_group
.
I'm assuming Viewsdb_or()
which is ok with a where group with a single itemused by (just cos it makes the code a little tidier imho)views_handler_filter_numeric::op_between() - if not it's easy to modifyI think that will do it.
$new_group = $this->query->set_where_group('OR', NULL, 'where');
$not_in = ($this->operator != '=');
$value = vms_get_current_mlid();
$this->query->add_where(
$new_group,
$this->real_field,
$value,
$this->operator = $not_in ? 'NOT IN' : 'IN'
);
if ($not_in) {
$this->query->add_where(
$new_group,
$this->real_field,
$value,
'IS NULL'
);
}