PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
no edit summary
mNo edit summary
No edit summary
Line 1: Line 1:
the human readable current time ex: 2010-12-21 10:05:06
the human readable time format ex: 2010-12-21 10:05:06
* php: echo date("y-m-d H:i:s", time());
* php:  
* mysql: SELECT NOW();
** echo date("y-m-d H:i:s", time() ); //the human readable current time ex: 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
* mysql: SELECT NOW(); /*the human readable current time */


the current timestamp ex: 1292897201
the current timestamp ex: 1292897201

Navigation menu