Use TIME as your field type, and use the MySQL NOW() function when inserting.
It will store the time with seconds included, such as 13:46:23, so if you don't want the seconds when you retrieve it from the database, you'll have cut off the seconds and the second colon with PHP's substr() or something.
There are also other ways to store times in MySQL, such as DATETIME, TIMESTAMP or an INT which contains the Unix timestamp. The TIME field uses the least amount of storage space out of all the options, but remember that it doesn't store any information about the date.
|