I have a mysql table that I created like this:
CREATE TABLE `Table` (
`Table_id` int(11) NOT NULL AUTO_INCREMENT,
`Table_date` datetime NOT NULL,
`Table_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`Played_id`))
ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8
Now I try to call the INSERT query:
INSERT INTO Table (`Table_date`) VALUES ('04/12/2015 16:50:35')
and it doesn't work. I get the confirmation that one row was inserted, but all I see is value 0000-00-00 00:00:00
as a Table_date. The timestamp in Table_modified is fine, it's current value, but only zeros in Table_date really bugs me. I know it's impossible to store two timestamps in database, that's why I've decided to switch and use the type Datetime as for Table_date, so far with no success. How can I fix it and fill that column with the time provided?