source/Core/Database/Adapter/Doctrine/Database.php
public function select($query, $parameters = [])
    {
        // @deprecated since v6.0 (2016-04-13); Backward compatibility for v5.3.0.
        $parameters = $this->assureParameterIsAnArray($parameters);
        // END deprecated

        $result = null;

        try {
            /**
             * Be aware that Connection::executeQuery is a method specifically for READ operations only.
             * This is especially important in master-slave Connection
             */
            /** @var \Doctrine\DBAL\Driver\Statement $statement Statement is prepared and executed by executeQuery() */
            $statement = $this->getConnection()->executeQuery($query, $parameters);

            $result = new \OxidEsales\Eshop\Core\Database\Adapter\Doctrine\ResultSet($statement);
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $result;
    }
public function select($query, $parameters = [])
    {
        // @deprecated since v6.0 (2016-04-13); Backward compatibility for v5.3.0.
        $parameters = $this->assureParameterIsAnArray($parameters);
        // END deprecated

        $result = null;

        try {
            /**
             * Be aware that Connection::executeQuery is a method specifically for READ operations only.
             * This is especially important in master-slave Connection
             */
            /** @var \Doctrine\DBAL\Driver\Statement $statement Statement is prepared and executed by executeQuery() */
            $statement = $this->getConnection()->executeQuery($query, $parameters);

            $result = new \OxidEsales\Eshop\Core\Database\Adapter\Doctrine\ResultSet($statement);
        } catch (DBALException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        } catch (PDOException $exception) {
            $exception = $this->convertException($exception);
            $this->handleException($exception);
        }

        return $result;
    }
public function select ( $ query , $ parameters = [ ] ) { // @deprecated since v6.0 (2016-04-13); Backward compatibility for v5.3.0. $ parameters = $ this -> assureParameterIsAnArray ( $ parameters ) ; // END deprecated $ result = null ; try { /**
             * Be aware that Connection::executeQuery is a method specifically for READ operations only.
             * This is especially important in master-slave Connection
             */ /** @var \Doctrine\DBAL\Driver\Statement $statement Statement is prepared and executed by executeQuery() */ $ statement = $ this -> getConnection ( ) -> executeQuery ( $ query , $ parameters ) ; $ result = new \ OxidEsales \ Eshop \ Core \ Database \ Adapter \ Doctrine \ ResultSet ( $ statement ) ; } catch ( DBALException $ exception ) { $ exception = $ this -> convertException ( $ exception ) ; $ this -> handleException ( $ exception ) ; } catch ( PDOException $ exception ) { $ exception = $ this -> convertException ( $ exception ) ; $ this -> handleException ( $ exception ) ; } return $ result ; }
Return the results of a given sql SELECT or SHOW statement as a ResultSet.
Throws an exception for any other statement.

The values of first row of the result may be via resultSet's fields property.
This property is an array, which keys may be numeric, strings or both, depending on the FETCH_MODE_* of the connection.
All further rows can be accessed via the specific methods of ResultSet.

IMPORTANT:
You are strongly encouraged to use prepared statements like this:
$resultSet = DatabaseProvider::getDb->select(
'SELECT * FROM ´mytable´ WHERE ´id´ = ? OR ´id´ = ?',
array($id1, $id2)
);
If you do not use prepared statements, you MUST quote variables the values with quote(), otherwise you create a
SQL injection vulnerability.

@param string $query      The sql select statement to be executed.
@param array  $parameters The parameters array for the given query.

@throws DatabaseErrorException The exception, that can occur while executing the sql statement.

@return \OxidEsales\Eshop\Core\Database\Adapter\ResultSetInterface The result of the given query.
Return the results of a given sql SELECT or SHOW statement as a ResultSet . Throws an exception for any other statement .