TABLE id city_name 1 Union 2 Marthasville $data = array('city_name', 'Marthasville'); //update record 2 from Marthasville to the same thing, Marthasville. $this->db->where('id', 2); $this->db->update('table', $data); if($this->db->affected_rows() > 0) { //I need it to return TRUE when the MySQL was successful even if nothing was actually updated. return TRUE; }else{ return FALSE; } if($this->db->affected_rows() >= 0){ } $result = $this->db->update('table', $data); if($result) { //without error even no row updated } else { }