Welcome Guest, Not a member yet? Register   Sign In
Error in auto lodaing of sessions ci_session table
#1

[eluser]Unknown[/eluser]
Hi there I just started using ci and kinda understand just a tiny bit of it's concept, I've enabled the 'sess_use_database' in my config which is intended to recognize my ci_session table in my loaded database, this error appears:


Error Number: 1364

Field 'user_data' doesn't have a default value

INSERT INTO `ci_sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('820155fa9bc6059cb16165126644bda0', '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv', 1279170475)



and I can't get a work around with it, can anyone help me? I would really appreciate it thank you very much.
#2

[eluser]WanWizard[/eluser]
You have made an error in defining the ci_sessions table.

Either define the user_data field so that NULL is allowed, or assign a default value to it (p.e. "").
#3

[eluser]Unknown[/eluser]
wow thanks WanWizard I've set the default value of the user_data as "null" and allowed null values in my database and it worked, now I can finally go on with this tutorial:

http://shawnmccool.com/2009/11/09/develo...n-process/

hopefully I get to absorb the information, and successfully create my first program using CI.

thanks




Theme © iAndrew 2016 - Forum software by © MyBB