yii查询构建器默认排序

I created a query:

<?php

$conditions = array();
$params = array();

$ids = explode(',', $_GET['ids']);

for($i = 0; $i < sizeof($ids); $i++)
{
    $conditions[] = 'ID=:id'.$i;
    $params[':id'.$i] = $ids[$i];
}            

if (!empty($conditions)) $conditions=implode(' OR ', $conditions);

$query = Yii::app()->db->createCommand()
               ->select()
               ->from('ABC')
               ->where($conditions, $params)
               ->limit(sizeof($ids))
               ->queryAll();

print_r($query);

problem is, by default it sorts the results by my table's primary key

my url looks like this, localhost/view?ids=6,5,1,4

and the results are sorted 1,4,5,6 i don't want that. is there a way not to sort?

you can always set order to DESC to make order descending or it will sort by defaults

->order('col_name desc')

also you can add a where with in condition to avoid that loop for creating where part

->where(array('in' , 'col_name' , $id_array))