MySQL使用UNIX_TIMESTAMP日期转unix时间戳的方法

1.
UPDATE `tongji` SET `yejitime` = UNIX_TIMESTAMP( `datetime` ) WHERE `datetime` > '2015-05-30'

2.
SELECT count( * ) , UNIX_TIMESTAMP( `datetime` ) , id
FROM `tongji`
WHERE `datetime` >'2015-06-08 22:27:37'