NikitOS
Well-known member
Hello.
I need to execute a query with the “WHERE IS” condition, but in the where function I do not see this condition:
Extending the repository class, I used this code:
Strange, but it worked and I didn't get any errors. But when I created a widget that also uses the “IS” condition, I got an error.
How do I create a query with the condition "IS"?
I need to execute a query with the “WHERE IS” condition, but in the where function I do not see this condition:
PHP:
switch ($operator)
{
case '=':
case '<>':
case '!=':
case '>':
case '>=':
case '<':
case '<=':
case 'LIKE':
case 'NOT LIKE':
case 'BETWEEN':
break;
default:
throw new \InvalidArgumentException("Operator $operator is not valid");
}
Extending the repository class, I used this code:
PHP:
$this->finder('MV\SBI:Bans')->where('type', 'IS', null)->fetch()->count();
How do I create a query with the condition "IS"?