src/CI_Base_Model.php
public function get_by()
    {
        $where = func_get_args();

        $this->apply_soft_delete_filter();

        $this->_set_where($where);

        $this->trigger('before_get');

        $this->limit(1);

        $result = $this->_database->get($this->_table);

        $this->num_rows = count((array)$result);

        $row = $result->{$this->_get_return_type_method()}();
        $this->_temporary_return_type = $this->return_type;

        $row = $this->trigger('after_get', $row);

        $this->_with = array();
        return $row;
    }
public function get_by()
    {
        $where = func_get_args();

        $this->apply_soft_delete_filter();

        $this->_set_where($where);

        $this->trigger('before_get');

        $this->limit(1);

        $result = $this->_database->get($this->_table);

        $this->num_rows = count((array)$result);

        $row = $result->{$this->_get_return_type_method()}();
        $this->_temporary_return_type = $this->return_type;

        $row = $this->trigger('after_get', $row);

        $this->_with = array();
        return $row;
    }
public function get_by ( ) { $ where = func_get_args ( ) ; $ this -> apply_soft_delete_filter ( ) ; $ this -> _set_where ( $ where ) ; $ this -> trigger ( 'before_get' ) ; $ this -> limit ( 1 ) ; $ result = $ this -> _database -> get ( $ this -> _table ) ; $ this -> num_rows = count ( ( array ) $ result ) ; $ row = $ result -> { $ this -> _get_return_type_method ( ) } ( ) ; $ this -> _temporary_return_type = $ this -> return_type ; $ row = $ this -> trigger ( 'after_get' , $ row ) ; $ this -> _with = array ( ) ; return $ row ; }
Fetch a single record based on an arbitrary WHERE call. Can be
any valid value to $this->_database->where().
Fetch a single record based on an arbitrary WHERE call . Can be any valid value to $this - > _database - > where () .