title: Comparing mysql result to current time in PHP
body: <p><code>$currentTime = date(&quot;h:i a&quot;);</code></p>
  <p>Im storing time in my db like this...
  <code>$timeEnd = date(&quot;h:i a&quot;);</code> which outputs &quot;07:15 pm&quot;.</p>
  <p>I need to compare $expireTime to $currentTime.</p>
  <p><code>$sql2 = &quot;UPDATE id SET expired = '1' WHERE timeEnd &lt;= '&quot;.$currentTime.&quot;' AND date = '&quot;.$currentDate.&quot;'&quot;;</code></p>
  <p>This code works except it's not considering am/pm... what am I doing wrong?</p>
  <p>EDIT:
  So it seems one answer would be to insert a 24 hour format into the db, which makes sense... is there anyway to make this work though? unix timestamp? strototime in the query?</p>