title: select table from unknown database
body: <p>I have two databases (say Old and In_Use), each with different tables. Tables in In_Use db are move after a while to Old db, and new tables are created in In_Use db.</p>
  
  <p>In a form, I have TableName as input, and want to select items from the selected table. But I do not know in which db that table is (because it changes over time)!</p>
  
  <p>From another post I got the following</p>
  
  <pre><code>$Old = mysql_connect($hostname, $username, $password); 
  $In_Use = mysql_connect($hostname, $username, $password, true); 
  
  mysql_select_db('Old', $Old);
  mysql_select_db('In_Use', $In_Use);
  </code></pre>
  
  <p>This code connects to the two databases.</p>
  
  <p>My question: is there a way to "virtually join" this two dbs, so that I can get items from a table that is either in Old or in In_Use?</p>
  
  <pre><code>mysql_query('select * from TableName', $TheTwoDBs);
  </code></pre>