title: Echo a single result from MySQL query
body: <p>I have the following MySQL query;</p>
  
  <pre><code>    SELECT *, @rownum := @rownum + 1 from
      (
      SELECT (display_name) 'Author',
          IFNULL(ROUND(SUM(balance.meta_value),2),2) 'Balance'
      FROM posts p
      JOIN users u 
          ON p.post_author = u.ID
      JOIN postmeta odd ON p.ID = odd.post_id AND odd.meta_key = 'odd' AND odd.meta_value &gt;= 1.5
      LEFT JOIN postmeta balance 
          ON p.ID = balance.post_id AND balance.meta_key = 'balance'
      WHERE p.post_status = 'publish' and p.post_author = 'User1' 
      GROUP BY u.ID
      ORDER BY Balance DESC
      )x, (SELECT @rownum := 0) r
  </code></pre>
  
  <p>which produces the following table;</p>
  
  <pre><code> Users      Balance       @rownum := 0       @rownum := @rownum + 1
   User1      5.88              0               1
   User2      -23.41            0               2
  </code></pre>
  
  <p>How can I echo the value of the last column for the first user (where [@rownum := @rownum + 1] = 1.</p>
  
  <p>Thanks</p>