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?