title: Query MySQL database for user names with their email addresses
body: <p>I'm looking for a way to query all of my users (simple enough) but i need to get specific users back in the results. I'll try explain the best i can below but in short i want to use a list of email addresses as a reference to pull all users matching those email addresses.</p>
  
  <h1>Brief overview</h1>
  
  <p>I have a wordpress website which i run events from. When people sign up for the events an account is created for them. there is also another table for attendees which links these user profiles to their registrations.</p>
  
  <p>As it is right now i need to get a list of people specific to one event organiser. I thought the best way to do this would be to use their email address from the attendee info and query my wp_users table for the user names. </p>
  
  <pre><code>SELECT display_name
  FROM `mydatabase`.`wp_users` WHERE `user_email` LIKE 
  'myemail@email.com' OR 
  'mysecondemail@email.com' OR
  'mythirdemail@email.com';
  </code></pre>
  
  <p>I've removed the real email and changed the database name.</p>
  
  <p>What i am trying to achieve is a query that will run through my list of users comparing their email address that i provide to the users in the table and return any of them that match.</p>
  
  <p>As it is right now it returns the first result it finds and stops. </p>
  
  <p>I've got the list of emails ready to go but i am struggling to get this to work.</p>