Läste följande om TIMESTAMP för MySQL när jag Googlade runt lite.
A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation because it is automatically set to the date and time of the most recent operation if you don't give it a value yourself. You can also set it to the current date and time by assigning it a NULL value.
Verkar kanon tänkte jag, att den automatiskt skulle lägga till datum/tid. Så jag gjorde en test. Men inte lade den till något per automatik, vad är felet?
Beginning with MySQL 4.1.1, the MySQL server can be run in MAXDB mode. When the server runs in this mode, TIMESTAMP is identical with DATETIME. That is, if the server is running in MAXDB mode at the time that a table is created, TIMESTAMP columns are created as DATETIME columns. As a result, such columns use DATETIME display format, have the same range of values, and there is no automatic initialization or updating to the current date and time.
Men det verkar som det bara fungerar på Unix, testade 'SET GLOBAL timze_zone = EST;' men får upp 'ERROR 1193: Unknown system variable 'time_zone''.
Någon lösning runt?
Andreas
260 ms totalt · 4 externa anrop · v20260731065814-full.51f67c91