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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -