title: MySQL order by IN order
body: <p>i have simple query:</p>
  
  <pre><code>SELECT data FROM table WHERE id IN (5, 2, 8, 1, 10)
  </code></pre>
  
  <p>Question is, how can i select my data and order it like in my IN.</p>
  
  <p>Order must be 5, 2, 8, 1, 10.</p>
  
  <p>Problem is that i have no key for order. IN data is from other query (1), but i need to safe order.</p>
  
  <p>Any solutions?</p>
  
  <p>(1) </p>
  
  <pre><code>SELECT login 
  FROM posts 
      LEFT JOIN users ON posts.post_id=users.id 
  WHERE posts.post_n IN (
      2280219,2372244, 2345146, 2374106, 2375952, 2375320, 2371611, 2360673, 2339976, 2331440, 2279494, 2329266, 2271919, 1672114, 2301856
  )
  </code></pre>
  
  <p><strong>Thanx for helping, solutions works but very slow, maybe find something better later, thanx anyway</strong></p>