PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
the human readable time format ex: 2010-12-21 10:05:06
the human readable time format ex: 2010-12-21 10:05:06
* php:  
* php:  
** echo date("y-m-d H:i:s", time() ); //return '2010-12-21 10:05:06'
** echo date("y-m-d H:i:s", time() ); //Convert the time stamp of current time to the human readable time format. Ex: return '2010-12-21 10:05:06'
** echo date("y-m-d H:i:s", 1292897201 ); // convert the time stamp 1292897201 to the human readable time format
** echo date("y-m-d H:i:s", 1292897201 ); // convert the time stamp 1292897201 to the human readable time format
* mysql: SELECT NOW(); /*the human readable current time */
* mysql: SELECT NOW(); /*the human readable current time */

Navigation menu