can i use array index as order in cakephp? -
i have use array condition, , @ same time, need use array index order. why because unable records in order.
here code:
my array- (which not in order)
array ( [0] => 252 [1] => 262 [2] => 297 [3] => 310 [4] => 322 [5] => 386 [6] => 1173 [7] => 1236 [8] => 205 [9] => 234 [11] => 256 [13] => 929 [18] => 389 [19] => 401 [21] => 1119 )
i want display results based on these values (id's), when using records in cake php, getting sorted (default - desc) order, not using order.
code:
$this->paginate = array ( 'conditions' => array( 'forum.id' => $final_list,'forum.is_active' => 1),); $forum_list = $this->paginate ( 'forum' );
can me, how can results array index order?
thanks.
Comments
Post a Comment