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

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

        $statement = $this->_prepareStatement($sql, $params, $driverOptions);
        $this->_executeStatement($statement, $sql, $params);
        $result = $statement->fetchColumn(0);

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

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

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

        $statement = $this->_prepareStatement($sql, $params, $driverOptions);
        $this->_executeStatement($statement, $sql, $params);
        $result = $statement->fetchColumn(0);

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

        return $result;
    }
public function getOneValue ( $ sql , $ params = array ( ) , array $ driverOptions = array ( ) ) { $ this -> _modifyParams ( $ sql , $ params ) ; $ this -> _fireEvent ( 'phpsweetpdo.get_one_value.started' , array ( 'sql' => & $ sql , 'params' => & $ params , 'driver_options' => & $ driverOptions ) ) ; $ statement = $ this -> _prepareStatement ( $ sql , $ params , $ driverOptions ) ; $ this -> _executeStatement ( $ statement , $ sql , $ params ) ; $ result = $ statement -> fetchColumn ( 0 ) ; $ this -> _fireEvent ( 'phpsweetpdo.get_one_value.finished' , array ( 'sql' => & $ sql , 'params' => & $ params , 'driver_options' => & $ driverOptions , 'result' => & $ result ) ) ; return $ result ; }
Function returns a single result from a query or false if no
rows were selected by query

@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 mixed|boolean A single value from SQL statement execution or boolean false if no result available
Function returns a single result from a query or false if no rows were selected by query