Hallo Zusammen,
ich versuche einen aktuellen Zeitpunkt in von PHP aus in einer MySQl-Datenbank zu speichern. Momentan ist noch egal, ob das Feld als Timestamp oder als Datetime definiert ist, wobei nach meinen Informationen Datetim wohl besser ist.
Ist das so? Keine Ahnung. Ich nehme dabei immer TIMESTAMP und richte mich nach dem MySQL-Handbuch, in dem es heißt:
Automatic updating of the first TIMESTAMP column occurs under any of the following conditions:
- The column is not specified explicitly in an INSERT or LOAD DATA INFILE statement.
- The column is not specified explicitly in an UPDATE statement and some other column changes value. (Note that an UPDATE that sets a column to the value it already has will not cause the TIMESTAMP column to be updated, because if you set a column to its
current value, MySQL ignores the update for eficiency.) - You explicitly set the TIMESTAMP column to NULL.
RTFM (mySQL) und such darin mal nach datetime und timestamp, wenn Du es noch genauer wissen willst.
--
Greetz,
Andreas
sh:( fo:) ch:| rl:| br:> n4:# ie:{ mo:) va:) de:] zu:) fl:( ss:| ls:<
Greetz,
Andreas
sh:( fo:) ch:| rl:| br:> n4:# ie:{ mo:) va:) de:] zu:) fl:( ss:| ls:<