title: Get mysql data older than 5 minutes php
body: <p>I have search and tried most of the answers and still could not work with my code. I need help with this not sure where is wrong. I insert timeon with <code>$date = current_time( 'mysql' );</code></p>
  
  <pre><code>My sql table online
  
  ID  int(11)         
  onlineppl   varchar(255)    
  timeon  datetime    
  
  data:
  ID  onlineppl   timeon
  18  1           2014-09-23 12:49:57
  17  3           2014-09-23 12:45:00
  16  12          2014-09-23 12:44:56
  
  $result = mysql_query("SELECT * FROM online WHERE timeon &lt; DATE_SUB(NOW(),INTERVAL 5 MINUTE)");
  $row = mysql_fetch_array($result);
  
  
  echo $row['onlineppl'];
  </code></pre>
  
  <p>I get no result... need help thanks.</p>