Asterisk func sql_esc


Escapes single ticks for use in SQL statements


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


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.


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+