I have some problems when I update my table with Ci Update. Here is my Code
$db = $this->input->post('db');
$tbl = $this->input->post('tbl');
$name = $this->input->post('name');
$col = $this->input->post('col_name');
$id = $this->input->post('id');
$array = array($col => $name);
$this->db->where('id',$id);
$this->db->update("`$db`.`$tbl`", $array);
Problem is database name. Database name can possible include "." sign. eg( db3.9 )
So Ci is produce update query like this
UPDATE `db3`.`9`.`mytbl` SET `name` = 'myname' WHERE `id` = 1
So anyone can tell me how can i solve this CI update auto escape solution.
PS. removing database name from this query is not what i want.
because database,table and columns are dynamic.So i can't define globally what database,table and columns.