SELECT * from 2 different non related tables in PHP/MySQL <p>I have the following code...</p> <pre><code>&lt;?php $sql = "SELECT tickets.company, tickets.datetime, tickets.ticketnumber, customer_notes.customer, customer_notes.timestamp, customer_notes.notes FROM tickets, customer_notes WHERE tickets.company = '".$_GET["seq"]."' AND customer_notes.customer = '".$_GET["seq"]."' GROUP BY customer_notes.customer, tickets.company "; $rs=mysql_query($sql,$conn) or die(mysql_error()); echo '&lt;table width="100%" border="0" cellspacing="5" cellpadding="5"&gt;'; while($result=mysql_fetch_array($rs)) { echo '&lt;tr&gt; &lt;td&gt;'.$result["timestamp"].'&lt;/td&gt; &lt;td&gt;'.$result["notes"].'&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;'.$result["datetime"].'&lt;/td&gt; &lt;td&gt;'.$result["ticketnumber"].'&lt;/td&gt; &lt;/tr&gt;'; } echo '&lt;/table&gt;'; ?&gt; </code></pre> <p>The tickets table and customer_notes table have no reference at all - they are totally separate.</p> <p>The tickets table is for support ticket when customer log issues they are having and then the customer_notes table is for when customers phone up, everything that is spoken about over the phone is logged in this table.</p> <p>I am trying to make it display data from the tickets table and the customer notes table in datetime order.</p> <p>so if a ticket was created, then a note added, then another note added, then a ticket they will display in datetime order using the above code however it is not displaying it correctly</p>