$primary_column_has_space = "annoying column";
$value = "value of column";
$data = array("column_one"=>"value one");
$this->db->where("`".$primary_column_has_space."`", $value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying column` 'value of column';
$this->db->where("`".$primary_column_has_space."` =", $value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying` `column` = 'value of column';
$this->db->where("`".$primary_column_has_space."` = ".$value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying` `column` = 'value of column';
Codeigniter is not support for update where column name has space? any solution?