db->select('*'); foreach ($where as $k => $v) { if (is_array($v)) { $this->db->where_in($k, $v); } else { $this->db->where($k,$v); } } $query = $this->db->get($this->table); return $query->row_array(); } } ?>