title: Two queries, two different tables, only one loop
body: <p>I would like to run two select statements for two different tables but list them in one loop. Currently I run them independently but this is not ideal as i would like the records listed in date order as a whole. The column names and column numbers are different.</p>
  
  <p>Simplified Current setup</p>
  
  <pre><code>     $SQL = "SELECT * FROM table1 WHERE colA IS NOT NULL ORDER BY dateA";
       $DataOne = mysql_query($SQL);
  
       $SQL = "SELECT * FROM table2 WHERE colZ IS NOT NULL ORDER BY dateZ";
       $DataTwo = mysql_query($SQL);
  
       while ($row = mysql_fetch_assoc($DataOne)) {
           echo "&lt;td&gt;$row[colA]&lt;/td&gt;"; 
       } 
  
          while ($row = mysql_fetch_assoc($DataTwo)) {
           echo "&lt;td&gt;$row[colZ]&lt;/td&gt;"; 
       }
  </code></pre>
  
  <p>Desired setup (logically)</p>
  
  <pre><code>while ($row = mysql_fetch_assoc($DataOne, $DataTwo)) {
      // all returned rows from both tables in date order
      echo "&lt;td&gt;$row[EitherCol]&lt;/td&gt;";
  }
  </code></pre>
  
  <p><em>INFO: I understand i should be using <code>mysqli</code> or <code>pdo</code> but it isn't an option at the moment</em></p>