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();
Was it helpful?

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
scroll top