title: Limit Row Display on Left Join with Where Clause
body: <p>I have a query which first is selecting one row from table cases and after that I have selection of 5 rows from join table payments. The results of the select is showing 5 results. I would like to limit it to show only one result the first select but still ti have selected all the 5 results from the join table in the memory. </p>
  
  <p>My query so far is the following: </p>
  
  <pre><code>SELECT c.*,  
  DATE_FORMAT( ADDDATE(c.proposal_date, INTERVAL 30 DAY),'%Y-%m-%d') AS expiration_date_30,  
  (SELECT name FROM members rp WHERE rp.id = c.resonsible_partner) as responsible_partner,            
  FROM cases c 
  LEFT JOIN payments AS inv ON inv.caseid = c.id 
  WHERE c.id = $id
  </code></pre>
  
  <p>Any Help will be welcome!</p>
  
  <p>Sample output in this case should display: </p>
  
  <p>from table cases should display <code>c.*</code> on screen: <code>id, casename, proposal_date</code> this is what is should controls how many rows will have to be displayed.</p>
  
  <pre><code>id  | casename | proposal_date |
  ------------------------------
  300 | One      | 2016-05-05    |
  </code></pre>
  
  <p>from table payments should display: <code>payment_percentage_01 = 25, payment_percentage_02 = 30, payment_number_01 = 1, payment_number_02 = 2</code> </p>
  
  <pre><code>id | caseid | payment_percentage | payment number |
  ---------------------------------------------------
  1  | 300    |        25          |        1       |
  2  | 300    |        30          |        2       |
  </code></pre>