From: Martijn Tonies Date: April 10 2006 12:18pm Subject: Re: timestamp & not null List-Archive: http://lists.mysql.com/mysql/196702 Message-Id: <029301c65c98$e8bc8090$cd02a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit > I need to create a "commands" table. A program will periodically check on this table whether > there's a pending command for it to execute or not. Whatever the reason, this program might read a command but not acknowledge it's > execution. > Other program will check out whether the command timeout has expired or not and so act accordingly. > I guess I can use some sort of integer in order to represent it as a unix timestamp, but I would prefer to use a "timestamp". > As I said -- to store date/time values, you should NOT use the TIMESTAMP datatype, cause it isn't supposed to be used to store custom date/time values. I suggest you read the documentation on MySQL Date/Time datatypes -- it has a fine explanation of what to use and what to use the TIMESTAMP datatype for. Don't bother going the Unix integer timestamp thingy route. Just read this: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-type-overview.html Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com