Pb when inserting in DB - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Pb when inserting in DB (/showthread.php?tid=27685) |
Pb when inserting in DB - El Forum - 02-17-2010 [eluser]FranckRR[/eluser] Hello guys, controller : Code: .... Model: Code: ... Error prompted Code: A Database Error Occurred Pb when inserting in DB - El Forum - 02-17-2010 [eluser]danmontgomery[/eluser] Quote:Unknown column '_ci_ob_level' in 'field list' There's no column _ci_ob_level in the table activities Pb when inserting in DB - El Forum - 02-18-2010 [eluser]FranckRR[/eluser] I wouldn't have post here to have this kind of answer ... Of course this column is not on my table because I didn't set it so ! The question remains why CI append this to my insert (through) db->insert() Pb when inserting in DB - El Forum - 02-19-2010 [eluser]rogierb[/eluser] Code: $this->db->insert('activities'); What are you inserting? I would have expected something like Code: $this->db->insert('activities', $insert_array); If you don't provide the $insert_array CI uses $this->ar_set and I have no idea how this would get filled without setting the array or using the $this->db->set() method. Pb when inserting in DB - El Forum - 02-19-2010 [eluser]danmontgomery[/eluser] Quote:`_ci_ob_level`, `_ci_view_path`, `_ci_is_php5`, `_ci_is_instance` These are private members of the controller class, and are being inserted because you're trying to insert the model object. |