title: MYSQL - SELECT from different databases
body: <p>How can I select data in the same query from two different databases into the same server?
  This is what I'm doing, but my query doesn't works:</p>
  
  <pre><code>$sqlquery = "SELECT * FROM database_2.table_2 WHERE database_1.table_1.data_1 LIKE database_2.table_2.data_2";
  
  $result = mysql_query($sqlquery);
  $number = mysql_numrows($result);
  
  $i = 0;
  if ($number &lt; 1) {
    print "DOH";
  
  }else{
    while ($number &gt; $i) {
      $content = mysql_result($result,$i,"database_2.table_2.data_3");
      print "$content";
      $i++;
    }
  }
  </code></pre>