![]() |
database error default values - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: database error default values (/showthread.php?tid=11988) |
database error default values - El Forum - 10-01-2008 [eluser]Unknown[/eluser] Hi Found a bug (I think) I'm using igniter 1.6.3, codex2 rc14.2, PHP5 and MySQL5. After install, when I try to access the page to login it gives me this error A Database Error Occurred Error Number: 1364 Field 'session_data' doesn't have a default value INSERT INTO ci_sessions (session_id, session_start, session_last_activity, session_ip_address, session_user_agent) VALUES ('1b02c4a60be799d5f85d0682298dad23', 1222853353, 1222853353, '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv') To over pass this, i change the default value of the field "session_data" to NULL. Then I can make the login and access the backend. But when I try to insert a value in Related Example I get other error A Database Error Occurred Error Number: 1364 Field 'example_id' doesn't have a default value INSERT INTO `related_example` (`name`, `description`) VALUES ('dsgfg', 'dfgfdhg') database error default values - El Forum - 02-12-2009 [eluser]moldova[/eluser] The issue described here is related to MySQL5 strict mode which can be turned off in my.ini file. Not sure if it is the best workaround to the problem. Has anybody solved this issue the other way? |