note 82315 deleted from function.getdate by danbrown

From: Date: Sun, 20 Jul 2008 03:04:41 +0000
Subject: note 82315 deleted from function.getdate by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-142018@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- 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")

« previous php.notes (#142018) next »