title: How do I write a mysql subquery where one table returns multiple rows based from a table that returns one row?
body: <p>Supposed that I have a table like this:</p>
  
  <pre><code>**tbl_purchase**
  PurchaseID
  Date
  Supplier
  
  **tbl_purchaseitem**
  PurchaseItemID
  PurchaseID
  </code></pre>
  
  <p>I want to create a query where it will return something like:</p>
  
  <pre><code>**Header**
  PurchaseID = 2
  Date: 4/26/12
  Supplier:stackoverflow
  
  *Items*
  PurchaseItemID:3
  PurchaseID:2
  
  PurchaseItemID:4
  PurchaseID:2
  
  PurchaseItemID:5
  PurchaseID:2
  </code></pre>
  
  <p>Sir/Ma'am your answers would be of great help and be very much appreciated.</p>