PHP and MySQL syntax: Difference between revisions
m →now |
|||
| Line 15: | Line 15: | ||
convert human-readable time to timestamp | convert human-readable time to timestamp | ||
* php: | * php:[http://php.net/manual/en/function.strtotime.php strtotime()] | ||
* mysql: select UNIX_TIMESTAMP('2011-03-15 18:53:57'); /* return timestamp: 1300186437 */ | * mysql: select UNIX_TIMESTAMP('2011-03-15 18:53:57'); /* return timestamp: 1300186437 */ | ||