I have a db with timestamp values in this format: 0000-00-00 00:00:00 When I add this to db, I add a minute to the current time. Now I need to check if the current value added time in db has passed. (x minute).
example add to db:
$time = strtotime ("+2 minutes"); $mysql_time = gmdate("Ymd H:i:s", $time);
Then I get this value from db. And you need to compare the current time with this value. I used unix values like this: if(time() <= $unix_time){...} , but now I want to compare the timestamp values. Something like if(timeMysql() <= $mysql_time){..}
source share