Halihallo Philipp Hasenfratz
SELECT UNIX_TIME(CONCAT(CURDATE(),' ',CURTIME()));
Würg. UNIX_TIMESTAMP natürlich, sorry.
Nachtrag:
http://www.mysql.com/doc/en/CREATE_TABLE.html says:
<quote>
A DEFAULT value has to be a constant, it can not be a function or an expression. If no DEFAULT value is specified for a column, MySQL automatically assigns one. If the column may take NULL as a value, the default value is NULL. If the column is declared as NOT NULL, the default value depends on the column type:
For numeric types other than those declared with the AUTO_INCREMENT attribute, the default is 0. For an AUTO_INCREMENT column, the default value is the next value in the sequence.
For date and time types other than TIMESTAMP, the default is the appropriate zero value for the type. For the first TIMESTAMP column in a table, the default value is the current date and time. See section 6.2.2 Date and Time Types.
For string types other than ENUM, the default value is the empty string. For ENUM, the default is the first enumeration value (if you haven't explicitly specified another default value with the DEFAULT directive).
Default values must be constants. This means, for example, that you cannot set the default for a date column to be the value of a function such as NOW() or CURRENT_DATE.
</quote>
zu Deutsch: Die erste Timestamp - Spalte hat als Defaultwert die aktuelle Serverzeit. Wobei ich das zur Zeit nicht verifizieren kann; zudem halte ich das für merkwürdig, da man ja eine Konstante als Default angibt, warum sollte also mysql etwas anderes verwenden? - Wie dem auch sei: Vielleicht hilfts dir ja.
Viele Grüsse
Philipp