title: Select info from one mysql db if value exist in another db
body: <p>I have this query <code>select latitude, longitude, username, rank from users</code>, but I only want that info if the <code>username</code> exist in my <code>online_users</code> db. That look like this: </p>
  
  <pre><code>id bigint(20)           
  username varchar(16)
  ip varchar(39)
  time datetime
  </code></pre>
  
  <p>So if I have 3 users in my <code>online_users</code> db, I want the <code>latitude, longitude, username and rank</code> from my <code>users</code> table from those 3 users. How do I do this? I assume <code>UNION</code> something, but my sql skills are limited. </p>