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

ruby - How do I merge two hashes into a hash of arrays? -

java - the value of local variable is not used -