Model_Article::query()->where('id', 4);
I'm using FuelPHP. I have query like the above.
And I have an arrays of ID's
$ids = array(1, 2, 4, 8 ...);
How do I apply my array of id's to write this query using that format?
Thanks a lot!
Model_Article::query()->where('id', 4);
I'm using FuelPHP. I have query like the above.
And I have an arrays of ID's
$ids = array(1, 2, 4, 8 ...);
How do I apply my array of id's to write this query using that format?
Thanks a lot!
Feed the 'IN' inside the ->where() to create an IN() clause:
Model_Article::query()->where('field_name', 'IN', array(1,2,3,4,5))->get();