MySQL Forums
Forum List  »  General

Adding Time data to MySQL
Posted by: hemantha atthanayake
Date: January 02, 2012 01:20AM

Hi. I'd like to add time (and no date, and not a timestamp) data to a field in MySQL through a PHP form. I've been having problems, as the date is also included. But I only want the time (I want to be able to sort the data by the time, and I think it was adding today's date along with the time, so if I enter the data on 5 different days, it won't sort correctly).

PHP Insert Code:

MySQL field:
Type: INT
Length/Values: 10
Default: None
Attributes: Unsigned
Everything else empty

Can anyone help with:
1) what should the php insert code be like.
2) what the field type, attributes, length/values, etc should



Options: ReplyQuote

Written By
Adding Time data to MySQL
January 02, 2012 01:20AM
January 02, 2012 04:57AM
January 03, 2012 10:38PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.