在mysql列中使用UNIX纪元?

A column in one of my tables is DATE and currently it gets automatically filled with a timestamp of when the row was made. The timestamp looks like 2013-02-10 19:56:12. Is there anyway I can have it timestamp with the unix epoch automatically? I hope this makes sense. I'm still a beginner when it comes to mysql.

if you want to project (select) TIMESTAMP into UNIX format, use UNIX_TIMESTAMP(date)

SELECT UNIX_TIMESTAMP(date)
FROM tableName

You could use the unix_timestamp function when retrieving data:

SELECT unix_timestamp(timestampColumn)