Scaffolding > SQL error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Scaffolding > SQL error (/showthread.php?tid=1930) |
Scaffolding > SQL error - El Forum - 07-05-2007 [eluser]Unknown[/eluser] Hello, I'm using CI 1.5.3, PHP 5.2.3 and MySQL 5.0.37. I have a table with the following structure: Code: CREATE TABLE `client` ( When I use scaffolding and try to insert a record (leaving an INT field "empty"), I get a Database error: Code: An Error Was Encountered I did some research and it appears that I can just edit the MySQL my.ini file and remove "STRICT_TRANS_TABLES" from sql-mode...but I wanted to know if there were any other options. I don't know that everyone normally can edit the MySQL my.ini file and it appears that the issue is cause by the scaffolding sending a '' instead of a null. Any thoughts? Scaffolding > SQL error - El Forum - 08-14-2007 [eluser]Unknown[/eluser] I've got the same problem - seems really odd to me that CodeIgniter doesn't treat datatypes differently? wouldn't this be a huge issue 99% of tables out there that have non varchar columns - or am i just missing something? Kurt |