login | register
Fri 09 of Jan, 2009 [01:00 UTC]

voip-info.org

Discuss [0] History

Asterisk func sql_esc

Created by: bcnit,Last modification on Tue 10 of Jul, 2007 [17:22 UTC]

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:



Comments