public static function prepareInstance(&$instance=null) {
		if( isset(self::$instances[$instance]) ) { return; }
		global $DBS;
		$instance = ensure_pdoinstance($instance);
		if( empty($DBS[$instance]) ) {
			throw new Exception("Adapter unable to connect to the database.");
		}
		if( empty(static::$adapters[$DBS[$instance]['driver']]) ) {
			throw new Exception("Adapter not found for driver {$DBS[$instance]['driver']}.");
		}
// 		$adapterClass = 'SQLAdapter'.$DBS[$instance]['driver'];
		$adapterClass = static::$adapters[$DBS[$instance]['driver']];
		// $instance is prepareInstance() name of instance and $instance is the real one
		self::$instances[$instance] = new $adapterClass($instance, $DBS[$instance]);
// 		self::$instances[$instance] = new $adapterClass($instance);
		if( empty(self::$instances[$instance]) ) {
			// null means default but default is not always 'default'
			self::$instances[$instance] = &self::$instances[$instance];
		}
	}