title: MySQL INTERVAL Mins
body: <p>I am trying to get the all records which are 2 hours or more old using this query:</p>
  
  <pre><code>$minutes = 60 * 2
  
  SELECT COUNT(id) AS TOTAL, job_id 
    from tlb_stats 
   WHERE log_time &gt;= DATE_SUB(CURRENT_DATE, INTERVAL $minutes MINUTE) 
  GROUP BY job_id
  </code></pre>
  
  <p>It only selects the recent records and skips the old. When I change <code>log_time &lt;= ...</code> it only selects old and skips which are the new one.</p>
  
  <p>What am I doing wrong?</p>