note 66100 added to function.getdate
| From: | JohnSherwood at osu1 dot php dot net | Date: | Sun, 14 May 2006 18:10:29 +0000 |
| Subject: | note 66100 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111280@lists.php.net to get a copy of this message | ||
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().
----
Server IP: 216.194.113.175
Probable Submitter: 70.179.99.103
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.getdate.php
Edit -- http://master.php.net/note/edit/66100
Del: integrated -- http://master.php.net/note/delete/66100/integrated
Del: useless -- http://master.php.net/note/delete/66100/useless
Del: bad code -- http://master.php.net/note/delete/66100/bad+code
Del: spam -- http://master.php.net/note/delete/66100/spam
Del: non-english -- http://master.php.net/note/delete/66100/non-english
Del: in docs -- http://master.php.net/note/delete/66100/in+docs
Del: other reasons-- http://master.php.net/note/delete/66100
Reject -- http://master.php.net/note/reject/66100
Search -- http://master.php.net/manage/user-notes.php