One, Miss Access era
The table structure of access if you want to automatically insert the current time, you can enter the default value now () when the column is defined and you can automatically insert the current time. and MySQL does not work, MySQL this dongdong default is the product below the command line, if not later have phpmyadmin this graphical interface dongdong words, estimated generally people are depressed. Of course, later MySQL official also out of the corresponding GUI tools, of course, exe. By MySQL This network service program's many users are renting the virtual host premise, looks like this kind of dongdong is also a luxury. HoHo, again digress, today's topic is using the timestamp type in MySQL.
Second, their own hands, ample clothing.
Used to be the type of datetime, but it seems that way, can not let MySQL automatically get the current time, but must go through php date ("y-m-d h:i:s"), and then update the past. Seems to be in the use of phpMyAdmin Insert test data When I'm sorry I lazy people. Later after the expert advice, did the following changes, the table column of datetime type changed to the TIMESTAMP type, and his default value changed to Current_timestamp, you can achieve my purpose.
But this dongdong has a small limit, is a table can only have one datestamp column set as the default Current_timestamp, the second can not set the default success, will return the following:
#1293-incorrect table definition; There can be only one TIMESTAMP column with Current_timestamp in DEFAULT or on UPDATE clause
。 This seems a bit uncomfortable to say. hoho~
Three, send 2 charts, give a contrast effect.