I am trying to run a query through ORM as follows:
SELECT * from table where (fname like 'string%' or lname like 'string%') AND (fname like 'string2%' or lname like 'string2%');
Here is what I still have:
$results = ORM::factory('profiles'); foreach ($strings as $string) { $result->where('fname', 'like', "$string%"); $result->or_where('lname', 'like', "$string%"); }
But this does not include parentheses. Any ideas?
php orm kohana kohana-3 kohana-orm
Dexterw
source share