how to handle while loop and calculate multiple values
<p>hi im running a query to get total number of minutes used in a conversation in an hour on cell
 query is</p>

<pre><code>$sql="SELECT COUNT(*) calls, AVG(cd.leg2duration) avg_dur 
      FROM call_detail cd 
      WHERE cd.cid_did =  '".$this-&gt;cid."' AND cd.phonetype = '8'
      AND cd.leg1start_date BETWEEN '{$this-&gt;startdate}' AND '{$this-&gt;enddate}'";
</code></pre>

<p>which is giving me result like </p>

<pre><code>hours minute
0        2
1        5
</code></pre>

<p>i want to display it like this 0-6 hours in a same column and calculate minutes used in 0-6 hours im not getting any idea how to implement it in my while loop please help </p>
