public function get_fieldset_sql($sql, array $params=null) {
        $rs = $this->get_recordset_sql($sql, $params);
        if (!$rs->valid()) {
            $rs->close(); // Not going to iterate (but exit), close rs
            return false;
        }
        $result = array();
        foreach($rs as $value) {
            $result[] = reset($value);
        }
        $rs->close();
        return $result;
    }
public function get_fieldset_sql($sql, array $params=null) {
        $rs = $this->get_recordset_sql($sql, $params);
        if (!$rs->valid()) {
            $rs->close(); // Not going to iterate (but exit), close rs
            return false;
        }
        $result = array();
        foreach($rs as $value) {
            $result[] = reset($value);
        }
        $rs->close();
        return $result;
    }
public function get_fieldset_sql ( $ sql , array $ params = null ) { $ rs = $ this -> get_recordset_sql ( $ sql , $ params ) ; if ( ! $ rs -> valid ( ) ) { $ rs -> close ( ) ; // Not going to iterate (but exit), close rs return false ; } $ result = array ( ) ; foreach ( $ rs as $ value ) { $ result [ ] = reset ( $ value ) ; } $ rs -> close ( ) ; return $ result ; }
Selects rows and return values of first column as array.

@param string $sql The SQL query
@param array $params array of sql parameters
@return array of values
Selects rows and return values of first column as array .