Friday, July 18, 2014

php strtotime function is similar to which mysql function.

Below are the options in mysql similar to PHP strtotime function.


                                        PHP                     |              MYSQL

       strtotime(date('Y-m-d'));                | select UNIX_TIMESTAMP(CURDATE()) fro dual ;
       strtotime(date('Y-m-d H:i:s'));      | select UNIX_TIMESTAMP(NOW()) fro dual ;

No comments:

Post a Comment