note 21542 added to function.mktime

From: Date: Thu, 16 May 2002 14:37:11 +0000
Subject: note 21542 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-30717@lists.php.net to get a copy of this message
If MySQL provides functions these are generally faster and easier to use then your own 'workaround' functions. Example : timestamps. Yes, MySQL uses another format than PHP. That's why MySQL has a function UNIX_TIMESTAMP(). Feed it with a MySQL timestamp and you'll get the UNIX timestamp (php uses this format). So you timestamped a record, and you need this value? SELECT UNIX_TIMESTAMP(row) AS stamp, id....etc... FROM table LIMIT 10 You can use it in WHERE statements and so on.... For full docs see the MySQL site -> http://www.mysql.com/documentation/mysql/bychapter /manual_Reference.html#Date_and_time_functions Happy Coding! -- http://www.php.net/manual/en/function.mktime.php http://master.php.net/manage/user-notes.php?action=edit+21542 http://master.php.net/manage/user-notes.php?action=delete+21542 http://master.php.net/manage/user-notes.php?action=reject+21542

« previous php.notes (#30717) next »