Hello
I have the following table definition:
CREATE TABLE session_info_tbl (
UserID int(11) NOT NULL default '0',
Expiration timestamp(14) NOT NULL,
IndividualsLastQuery varchar(255) NOT NULL default '',
PRIMARY KEY (UserID)
) TYPE=MyISAM;
I am trying to add a new row to the table with the following command:
INSERT INTO session_info_tbl (UserID, Expiration, IndividualsLastQuery) VALUES ('test', 1081623606, '');
but for some reason the row that gets added is:
UserID: 0
Expiration: 00000000000000
IndividualsLastQuery:
What am I doing wrong?
I know the following the the MySQL spec:
Illegal DATETIME, DATE, or TIMESTAMP values are converted to the ``zero'' value of the appropriate type ('0000-00-00 00:00:00', '0000-00-00', or 00000000000000).
Why is my timestamp wrong? and even if it is wrong, why wasn't the userID field set appropriately?
I am doing it in PHP and mysql_query() returns true. So there was no error in the query.
thanks in advance