php - where in clause and query multiple IDs using FuelPHP -


model_article::query()->where('id', 4); 

i'm using fuelphp. have query above.

and have arrays of id's

$ids = array(1, 2, 4, 8 ...); 

how apply array of id's write query using format?

thanks lot!

feed 'in' inside ->where() create in() clause:

model_article::query()->where('field_name', 'in', array(1,2,3,4,5))->get(); 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -