{"provider_name":"Hatena Blog","blog_url":"https://monmon.hateblo.jp/","blog_title":"\u3053\u3093\u306b\u3061\u306f\u3053\u3093\u306b\u3061\u306fmonmon\u3067\u3059\uff01","author_url":"https://blog.hatena.ne.jp/lesamoureuses/","version":"1.0","url":"https://monmon.hateblo.jp/entry/20120507/1336375838","author_name":"lesamoureuses","image_url":null,"height":"190","categories":["mysql","CakePHP"],"provider_url":"https://hatena.blog","published":"2012-05-07 16:30:38","description":"where\u53e5\u306eIN\u306e\u4e26\u3073\u9806\u3067\u7d50\u679c\u3092sort\u3057\u305f\u3044\u3068\u304d\u306fORDER BY FIELD\u3092\u4f7f\u3046\u306e\u7d9a\u304dfind\u306eorder\u306e\u6240\u3067 <?php array('order' => array('FIELD(Country.id, 4, 1, 5, 3, 6, 2)')) \u3068\u66f8\u3051\u3070\u3044\u3044\u3002 \u53c2\u7167 http://cakebaker.42dh.com/2008/06/10/order-by-field/ Ok, let\u2019s do some examples to learn more about it. We will use the following countries table: [1] => USA [\u2026","type":"rich","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmonmon.hateblo.jp%2Fentry%2F20120507%2F1336375838\" title=\"CakePHP\u3067where\u53e5\u306eIN\u306e\u4e26\u3073\u9806\u3067\u7d50\u679c\u3092sort\u3057\u305f\u3044\u3068\u304d\u306fORDER BY FIELD\u3092\u4f7f\u3046 - \u3053\u3093\u306b\u3061\u306f\u3053\u3093\u306b\u3061\u306fmonmon\u3067\u3059\uff01\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","title":"CakePHP\u3067where\u53e5\u306eIN\u306e\u4e26\u3073\u9806\u3067\u7d50\u679c\u3092sort\u3057\u305f\u3044\u3068\u304d\u306fORDER BY FIELD\u3092\u4f7f\u3046"}