Jump to content

Seaching mysql databases useing time stamps


campnonet

Recommended Posts

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

"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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.