I have an array of post data ($data) in codeigniter that looks like the attached image.
And a database that looks like:
id: 3 val: 37.10119357072203
-
id: 4 val: -122.06634521484374
I want to insert the array value into the 'val' field based on the array key matching the database 'id' field. How do I do this using codeigniter's update_batch. My model is currently:
public function edit_config($data){
$this->db->update_batch('extra_config', $data,'val');
}
but I get the error:
One or more rows submitted for batch updating is missing the specified index.


$this->db->last_query()and post it here?Array ( [val] => Array ( [3] => 37.10119357072203 [4] => -122.06634521484374 [5] => 37.51571709945411... is print_r($data)