Concerning datetime type: Eg. in a forum if someone posts a message the date and the time is stored and shown of that message. I suppose they use timestamp in that case?
They could, but because of the 'magic' behaviour of TIMESTAMP a DATETIME is often used. To conserve space, a UNIX TIMESTAMP is sometimes used, this is stored as an unsigned INT (4 bytes):
mysql> select unix_timestamp(now()); +-----------------------+ | unix_timestamp(now()) | +-----------------------+ | 1108738332 | +-----------------------+ 1 row in set (0.01 sec)
mysql> select from_unixtime(1108738332); +---------------------------+ | from_unixtime(1108738332) | +---------------------------+ | 2005-02-18 15:52:12 | +---------------------------+ 1 row in set (0.00 sec)
-- Roger
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]