public function field_by_name($name)
    {
        if (!$this->row) {
            return null;
        }
        
        if (!array_key_exists($name, $this->row)) {
            trigger_error("Field with the name '$name' does not exist in the result set!", E_USER_ERROR);
            return null;
        }
        
        return $this->row[$name];
    }