protected function _getValue( $sql, $column, $name = 'db' )
	{
		$result = $this->_getConnection( $name )->create( $sql )->execute();

		if( ( $row = $result->fetch() ) === false ) {
			throw new MW_Setup_Exception( sprintf( 'No rows found: %1$s', $sql ) );
		}

		if( array_key_exists( $column, $row ) === false ) {
			throw new MW_Setup_Exception( sprintf( 'No column "%1$s" found: %2$s', $column, $sql ) );
		}

		$result->finish();

		return $row[$column];
	}
protected function _getValue( $sql, $column, $name = 'db' )
	{
		$result = $this->_getConnection( $name )->create( $sql )->execute();

		if( ( $row = $result->fetch() ) === false ) {
			throw new MW_Setup_Exception( sprintf( 'No rows found: %1$s', $sql ) );
		}

		if( array_key_exists( $column, $row ) === false ) {
			throw new MW_Setup_Exception( sprintf( 'No column "%1$s" found: %2$s', $column, $sql ) );
		}

		$result->finish();

		return $row[$column];
	}
protected function _getValue ( $ sql , $ column , $ name = 'db' ) { $ result = $ this -> _getConnection ( $ name ) -> create ( $ sql ) -> execute ( ) ; if ( ( $ row = $ result -> fetch ( ) ) === false ) { throw new MW_Setup_Exception ( sprintf ( 'No rows found: %1$s' , $ sql ) ) ; } if ( array_key_exists ( $ column , $ row ) === false ) { throw new MW_Setup_Exception ( sprintf ( 'No column "%1$s" found: %2$s' , $ column , $ sql ) ) ; } $ result -> finish ( ) ; return $ row [ $ column ] ; }
Executes a given SQL statement and returns the value of the named column and first row.

@param string $sql SQL statement to execute
@param string $column Column name to retrieve
@param string $name Name from the resource configuration
Executes a given SQL statement and returns the value of the named column and first row .