title: Comparing time from database and current time retrieved using date() function
body: <pre><code> date_default_timezone_set('Asia/Calcutta');
  
  $currenttimeminus30=date('H:i:s', strtotime("-30 minutes"));
  
  
   $query1=mysql_query("select * from outdoor where latitude='$latitude%' &amp;&amp; longitude='$longitude%' &amp;&amp; user_id='$userid' &amp;&amp; last_updated&lt;$currenttimeminus30");
  </code></pre>
  
  <p>I need to compare whether last_updated &lt; $currenttimeminus30 .last_updated is a field in outdoor table and it is of type time.
  last_updated value is like 13:05:11</p>