Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Verwenden von Order By in Codeigniter

Verwenden Sie besser diesen Weg

$ids = "1,3,2,4";
$qry ="SELECT * FROM (`destination`) WHERE `id` IN ($ids) ORDER BY `FIELD` ( id, $ids )";
$result = $this->db->query($qry);
return $result->result();