public static function Escape($val)
    {
    	if (DataAdapter::$ADAPTER_INSTANCE) DataAdapter::$ADAPTER_INSTANCE->LoadDriver();

		// this is an unfortunate leftover from poor design of making this function static
		// we cannon use the driver's escape method without a static reference
		if (!DataAdapter::$DRIVER_INSTANCE) throw new Exception("DataAdapter must be instantiated before Escape can be called");

		// if magic quotes are enabled, then we need to stip the slashes that php added
		if (get_magic_quotes_runtime() || get_magic_quotes_gpc()) $val = stripslashes($val);
		
		// $driver->RequireConnection(true);
		return DataAdapter::$DRIVER_INSTANCE->Escape($val);
	}
public static function Escape($val)
    {
    	if (DataAdapter::$ADAPTER_INSTANCE) DataAdapter::$ADAPTER_INSTANCE->LoadDriver();

		// this is an unfortunate leftover from poor design of making this function static
		// we cannon use the driver's escape method without a static reference
		if (!DataAdapter::$DRIVER_INSTANCE) throw new Exception("DataAdapter must be instantiated before Escape can be called");

		// if magic quotes are enabled, then we need to stip the slashes that php added
		if (get_magic_quotes_runtime() || get_magic_quotes_gpc()) $val = stripslashes($val);
		
		// $driver->RequireConnection(true);
		return DataAdapter::$DRIVER_INSTANCE->Escape($val);
	}
public static function Escape ( $ val ) { if ( DataAdapter :: $ ADAPTER_INSTANCE ) DataAdapter :: $ ADAPTER_INSTANCE -> LoadDriver ( ) ; // this is an unfortunate leftover from poor design of making this function static
 // we cannon use the driver's escape method without a static reference
 if ( ! DataAdapter :: $ DRIVER_INSTANCE ) throw new Exception ( "DataAdapter must be instantiated before Escape can be called" ) ; // if magic quotes are enabled, then we need to stip the slashes that php added
 if ( get_magic_quotes_runtime ( ) || get_magic_quotes_gpc ( ) ) $ val = stripslashes ( $ val ) ; // $driver->RequireConnection(true);
 return DataAdapter :: $ DRIVER_INSTANCE -> Escape ( $ val ) ; }
Removes any illegal chars from a value to prepare it for use in SQL

@access public
@param string $val
@return string
Removes any illegal chars from a value to prepare it for use in SQL