campnonet Posted February 21, 2013 Share Posted February 21, 2013 (edited) i am trying to search my mysql data bases to fine all user who passed a quiz and got a certificate todays ago but the date bases puts the time the certificate in unix time stamp and any help me write a php code that will pull the date out i am at a lost thank you Edited February 21, 2013 by campnonet Quote Link to comment https://forums.phpfreaks.com/topic/274794-seaching-mysql-databases-useing-time-stamps/ Share on other sites More sharing options...
requinix Posted February 21, 2013 Share Posted February 21, 2013 "todays ago"? Today, or two days ago? For today mktime is easiest. Pass it hour=0 minute=0 second=0. For two days ago strtotime is easiest. Give it a string like "-2 days". Both will return to you a Unix timestamp you can use for comparison in the SELECT query. Quote Link to comment https://forums.phpfreaks.com/topic/274794-seaching-mysql-databases-useing-time-stamps/#findComment-1414012 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.