CI Pros and Cons of $this->db->insert($data_array) and $this->db->insert($_POST)?
Posted by jovaniwayne on May 14, 2010
0 comments
What is the difference of $this->db->insert($data_array) and $this->db->insert($_POST)? In $this->db->insert($data_array), data to be inserted into the database is firstly stored in an array. e.g. $data_array=array(‘field_a’=>’value of field_a’, ‘field_b’=> ‘the value of field_b’); $this->db->insert($data_array); While in $this->db->insert($_POST), POST vars were directly being passed. Take into serious consideration that all post vars must be same as your [...]



