I'm using Kohana's ORM library, and I'm wondering if there is any way to select DB records in a particular predetermined sequence.
$products_ids = array('5', '6', '1', '33', '2');
$products = ORM::factory('Product')->where('state', '=', 1)
->and_where('id', 'IN', $products_ids)->find_all();
This orders result by primary key (id). So result records ordered like (1, 2, 5, 6, 33). How select records by order defined in $products_ids ('5', '6', '1', '33', '2')?
Thanks.