title: PHP mysql select results
body: <pre>
  &lt;?php
  $sql = &quot;
    SELECT e.*, l.counts AS l_counts, l.date AS l_date, lo.counts AS lo_counts, lo.date AS lo_date
    FROM employee e
    LEFT JOIN logs l 
    ON l.employee_id = e.employee_id
    LEFT JOIN logout lo
    ON lo.employee_id = e.employee_id
    WHERE e.employee_id =&quot; .(int)$_GET['salary'];
  
    $query = mysql_query($sql);
  
    $rows = mysql_fetch_array($query);
  
    while($countlog = $rows['l_counts']) {
    echo $countlog;
    }
  echo $rows['first_name']; 
  echo $rows['last_name_name']; 
  ?&gt;
  </pre>
  
  <p><br>
  I got what I want to my first_name and last_name(get only 1 results). The <strong>l_counts</strong> I wanted to loop that thing but the result is not stop counting until my pc needs to restart. LoL. How can I get the exact result of that? I only need to get the exact results of <strong>l_counts</strong>.<br /><br />
  <strong>Thank you</strong><br />
  <strong>Jordan Pagaduan</strong></p>