I know this is a little late, but I found this post when looking into it and found a better solution than the one proposed by Sean.
$name = 'Bob';
$this->db->where('city', 'My City');
$this->db->where('state', 'My State');
$this->db->group_start();
$this->db->like('name', $name);
$this->db->or_like('name', $name);
$this->db->group_end();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…