note 66100 deleted from function.getdate by danbrown
| From: | danbrown@php.net | Date: | Sun, 20 Jul 2008 03:04:29 +0000 |
| Subject: | note 66100 deleted from function.getdate by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142017@lists.php.net to get a copy of this message | ||
Note Submitter: John Sherwood
----
In response to the "Simple routine for determining whether a date in mySQL format has gone
past":
function pastdate($t)
{
if (strtotime($t) < time())
return false;
return true;
}
or you could use
mysql_select("SELECT UNIX_TIMESTAMP(fieldname) FROM tablename"), which would give you the
date in seconds since unix epoch, and which you could compare to time().