note 82315 added to function.getdate
| From: | Anonymous at osu1 dot php dot net | Date: | Sat, 05 Apr 2008 03:38:48 +0000 |
| Subject: | note 82315 added to function.getdate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-137950@lists.php.net to get a copy of this message | ||
John Sherwood says:
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().
However the datetime on the database server may not exactly match the datetime on the machine
executing the PHP script.
Maybe better to get both at the same time - eg:
mysql_select("SELECT UNIX_TIMESTAMP(fieldname) AS
a, UNIX_TIMESTAMP() AS
b FROM tablename")
----
Server IP: 61.129.15.91
Probable Submitter: 220.163.4.106
----
Manual Page -- http://www.php.net/manual/en/function.getdate.php
Edit -- https://master.php.net/note/edit/82315
Del: integrated -- https://master.php.net/note/delete/82315/integrated
Del: useless -- https://master.php.net/note/delete/82315/useless
Del: bad code -- https://master.php.net/note/delete/82315/bad+code
Del: spam -- https://master.php.net/note/delete/82315/spam
Del: non-english -- https://master.php.net/note/delete/82315/non-english
Del: in docs -- https://master.php.net/note/delete/82315/in+docs
Del: other reasons-- https://master.php.net/note/delete/82315
Reject -- https://master.php.net/note/reject/82315
Search -- https://master.php.net/manage/user-notes.php