D
D
del9937882016-12-01 16:32:21
PHP
del993788, 2016-12-01 16:32:21

How to set the current time and date?

I am doing an insert query in mysql. The database has two columns: date and time. How to specify the current time when inserting data? I read the documentation, but I still don't understand. There is an error on date() and time().

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Mirilaczvili, 2016-12-01
@2ord

CURRENT_TIMESTAMP - according to the SQL 92 standard .
NOW() - MySQL specific.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question