私のクエリはmagentoコレクションから生成されています
$userModel = Mage::getSingleton('user/user')->getCollection()->addFieldToFilter('user_id', array('in' => array($User_Id)));
SELECT `main_table`.user_name FROM `user_table` AS `main_table` WHERE (user_id IN('1', '3', '2'));
このクエリを使用したい:
SELECT `main_table`.user_name FROM `user_table` AS `main_table` WHERE (user_id IN('1', '3', '2')) ORDER BY FIELD(user_id , 1,3,2);
ID が入力された順序でユーザー名が表示されるようにします。つまり、「1,3,2」
を使用してコレクションをロードするためにMagentoで使用される方法はどれORDER BY
ですか?
前もって感謝します!