Tag Archives: inserting post vars

CI Pros and Cons of $this->db->insert($data_array) and $this->db->insert($_POST)?

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 [...]

Blog WebMastered by All in One Webmaster.
Plugin from the creators of Brindes Personalizados :: More at Plulz Wordpress Plugins