/**
* Real escapes, using mysql_real_escape_string() or addslashes()
*
* @see mysql_real_escape_string()
* @see addslashes()
* @access private
*
* @param string $string The string to escape.
*
* @return string Escaped string.
*/
function _real_escape( $string ) {
if ( is_resource( $this->dbhs['global_r'] ) ) {
if ( $this->use_mysqli ) {
return mysqli_real_escape_string( $this->dbhs['global_r'] , $string );
} else {
return mysql_real_escape_string( $string, $this->dbhs['global_r'] );
}
} else {
return addslashes( $string );
}
}