Name

mysql_odbc_remove_escape —

Synopsis

void mysql_odbc_remove_escape(MYSQL *mysql, char *string )

Removes escape characters from a string. This function is intended for ODBC drivers themselves, and not for general use. Given a string, this function removes the escape character (\) preceding any other escape characters. This modifies (and thus shortens) the original string that was passed in.

Example

char *escaped = "\\'an escaped quoted string.\\'";
/* escaped contains the string: \' and escaped quoted string.\' */
mysql_odbc_remove_escape(&mysql, escaped);
/* escaped now contains the string: 'an escaped quoted string.' */

Get Managing & Using MySQL, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.