campnonet Posted February 21, 2013 Share Posted February 21, 2013 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 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. 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
Archived
This topic is now archived and is closed to further replies.