Kohana 3 ORM query using NOTIN()
-
12-11-2019 - |
Question
Is there a way to use a http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_not-in with Kohana's ORM? Something like:
$products = ORM::factory('products')->notin('contry_id', $csl)->find_all();
Solution
Use where statement:
$products = ORM::factory('products')->where('contry_id', 'NOT IN', $csl)->find_all();
$csl must be array
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow