Asterisk func sql_esc

Synopsis:

Escapes single ticks for use in SQL statements

Description:

SQL_ESC(<data>) - Used in SQL templates to escape data which may contain single ticks (') which are otherwise used to delimit data.

Notes:

This function is a part of the ODBC module and ODBC must be compiled into Asterisk for this function to be available.
This may mean you have to install 'unixodbc' and 'ltdl'.

Return value:

Returns the resulting string.

Example:

SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'

See also:


Synopsis:

Escapes single ticks for use in SQL statements

Description:

SQL_ESC(<data>) - Used in SQL templates to escape data which may contain single ticks (') which are otherwise used to delimit data.

Notes:

This function is a part of the ODBC module and ODBC must be compiled into Asterisk for this function to be available.
This may mean you have to install 'unixodbc' and 'ltdl'.

Return value:

Returns the resulting string.

Example:

SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'

See also:


Created by: bcnit, Last modification: Tue 10 of Jul, 2007 (17:22 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+