Storing timestamps in mySQL

Viewed 25996

I remember I read somewhere that mySQL timestamp data type is used to be updated automatically when the row updates, is this true?

Do I have to store timestamps with timestamp datatype or with bigint for example?

NB: the timestamp that has to be stored is not generated by mySQL, it's a pre-defined value that will be generated with PHP.

Thanks.

6 Answers

The correct answer is int(11), because a timestamp is a big/large integer.

Related