PHP and MySQL syntax: Difference between revisions

Jump to navigation Jump to search
m
Line 3: Line 3:
=== now ===
=== now ===
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: 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'
* php: 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'
* mysql:  
* mysql:  
** SELECT NOW(); /*return the human readable current time: 2011-04-01 12:19:43 */
** SELECT NOW(); /*return the human readable current time: 2011-04-01 12:19:43 */

Navigation menu