public function select($sql, $params = array (), array $driverOptions = array ()) {
        $this->_modifyParams($sql, $params);

        $this->_fireEvent('phpsweetpdo.select.started',
                          array ('sql' => &$sql, 'params' => &$params, 'driver_options' => &$driverOptions));

        $statement = $this->_prepareStatement($sql, $params, $driverOptions);

        $result = new Recordset($statement, $params);

        $this->_fireEvent('phpsweetpdo.select.finished',
                          array ('sql'    => &$sql, 'params' => &$params, 'driver_options' => &$driverOptions,
                                 'result' => &$result));

        return $result;
    }
public function select($sql, $params = array (), array $driverOptions = array ()) {
        $this->_modifyParams($sql, $params);

        $this->_fireEvent('phpsweetpdo.select.started',
                          array ('sql' => &$sql, 'params' => &$params, 'driver_options' => &$driverOptions));

        $statement = $this->_prepareStatement($sql, $params, $driverOptions);

        $result = new Recordset($statement, $params);

        $this->_fireEvent('phpsweetpdo.select.finished',
                          array ('sql'    => &$sql, 'params' => &$params, 'driver_options' => &$driverOptions,
                                 'result' => &$result));

        return $result;
    }
public function select ( $ sql , $ params = array ( ) , array $ driverOptions = array ( ) ) { $ this -> _modifyParams ( $ sql , $ params ) ; $ this -> _fireEvent ( 'phpsweetpdo.select.started' , array ( 'sql' => & $ sql , 'params' => & $ params , 'driver_options' => & $ driverOptions ) ) ; $ statement = $ this -> _prepareStatement ( $ sql , $ params , $ driverOptions ) ; $ result = new Recordset ( $ statement , $ params ) ; $ this -> _fireEvent ( 'phpsweetpdo.select.finished' , array ( 'sql' => & $ sql , 'params' => & $ params , 'driver_options' => & $ driverOptions , 'result' => & $ result ) ) ; return $ result ; }
Executes a select statement and returns data for it.

@param string|array $sql           SQL statement to execute.
@param array|mixed  $params        Query parameters to substitute instead of ? marks in query
@param array        $driverOptions Specific options to pass to underlying PDO prepare() call. Empty array if no options

@return Recordset The recordset, containing selection results
Executes a select statement and returns data for it .