Replaced addslashes with $this->db->escape