Drivers\Abstraction\Sql::getVar PHP Method

getVar() public method

Get value directly from single field. Previusly called get_var().
public getVar ( $query = null ) : string | integer
return string | integer Depen on it record value.
    public function getVar($query = null)
    {
        if (is_null($query)) {
            $query = $this->command();
        }
        $result = $this->row($query);
        $key = array_keys(get_object_vars($result));
        return $result->{$key}[0];
    }