CI_DB_result::row_object PHP Method

row_object() public method

Returns a single result row - object version
public row_object ( integer $n ) : object
$n integer
return object
    public function row_object($n = 0)
    {
        $result = $this->result_object();
        if (count($result) === 0) {
            return NULL;
        }
        if ($n !== $this->current_row && isset($result[$n])) {
            $this->current_row = $n;
        }
        return $result[$this->current_row];
    }