Home > Backend Development > PHP Tutorial > php mysql space insert current time in php MYSQL

php mysql space insert current time in php MYSQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 08:37:44
Original
1156 people have browsed it

The NOW() function returns the current date and time as `'YYYY-MM-DD HH:MM:SS', which can be directly stored in the DATETIME field.
CURDATE() returns today's date in the format of 'YYYY-MM-DD', which can be directly stored in the DATE field.
CURTIME() returns the current time in the format of 'HH:MM:SS', which can be directly stored in the TIME field.
Example: insert into tablename (fieldname) values ​​(now())

The above introduces the php mysql space to insert the current time in php MYSQL, including the content of php mysql space. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php - mysql monitoring problem
From 1970-01-01 08:00:00
0
0
0
PHP toolbox mysql cannot start
From 1970-01-01 08:00:00
0
0
0
How to upgrade mysql in php toolbox
From 1970-01-01 08:00:00
0
0
0
Can the php toolbox change the mysql version?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template