Subject: Timestamp column causes exceptions
Hi Kien,
Here's what I am trying to do:
Session_model::create( array('id' => $id, 'expire' => time(), 'session_data' => $sessiondata ) );
And the result: Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message '23000, 1048, Column 'expire' cannot be null'
It appears to not cause an exception when a "date("Y-m-d H:i:s")" is passed, but that's not what I want.
What should I do?
Using PHP 5.3, PHP.activerecord Stable 1.0
assuming you're using mysql, don't use Timestamp:
`expire` int(10) UNSIGNED NOT NULL,
(1-1/1)
June 27 2010
April 16, 2013
Subject: Timestamp column causes exceptions
Hi Kien,
Here's what I am trying to do:
Session_model::create( array('id' => $id, 'expire' => time(), 'session_data' => $sessiondata ) );
And the result:
Fatal error: Uncaught exception 'ActiveRecord\DatabaseException' with message '23000, 1048, Column 'expire' cannot be null'
It appears to not cause an exception when a "date("Y-m-d H:i:s")" is passed, but that's not what I want.
What should I do?
Using PHP 5.3, PHP.activerecord Stable 1.0