final public function queryArrayKey(string $query, string $keyField, string $keyPrefix = '')
    {
        $result = $this->queryResult($query);
        if (false === $result) {
            return false;
        }

        $return = [];
        while ($row = $result->fetchRow()) {
            if (! array_key_exists($keyField, $row)) {
                return false;
            }
            $return[$keyPrefix . $row[$keyField]] = $row;
        }
        return $return;
    }
final public function queryArrayKey(string $query, string $keyField, string $keyPrefix = '')
    {
        $result = $this->queryResult($query);
        if (false === $result) {
            return false;
        }

        $return = [];
        while ($row = $result->fetchRow()) {
            if (! array_key_exists($keyField, $row)) {
                return false;
            }
            $return[$keyPrefix . $row[$keyField]] = $row;
        }
        return $return;
    }
final public function queryArrayKey ( string $ query , string $ keyField , string $ keyPrefix = '' ) { $ result = $ this -> queryResult ( $ query ) ; if ( false === $ result ) { return false ; } $ return = [ ] ; while ( $ row = $ result -> fetchRow ( ) ) { if ( ! array_key_exists ( $ keyField , $ row ) ) { return false ; } $ return [ $ keyPrefix . $ row [ $ keyField ] ] = $ row ; } return $ return ; }
Get an array of rows of a query
It uses the keyField as index of the array

@param string $query
@param string $keyField
@param string $keyPrefix
@return array|false
Get an array of rows of a query It uses the keyField as index of the array