title: MYSql: which one is better for get ROWS? (Where IN ()) or foreach
body: <p>I have a table <code>users</code> include <strong>100000</strong> rows</p>
  
  <p>now, which one is better for SELECT?</p>
  
  <p><strong>A.</strong></p>
  
  <pre><code>select * 
  from users 
  where user_id IN    
  (5,12,5979,124,455594,5444,..........4568,10001,546,9979,21315);
  </code></pre>
  
  <p><strong>B.</strong></p>
  
  <pre><code>`$user_ids = {5,12,5979,124,455594,5444,.......4568,10001,546,9979,21315};`
  
  foreach ($user_ids as $id) {
       select * from users where user_id = $id;
  }
  </code></pre>
  
  <p>I would like to know the better solution from this</p>