ODBC_SQL(SQL-Query)func_odbc.conf definiert. Sie ist hier angeführt, da
sie in der Beispielkonfiguration von Asterisk enthalten ist. Für weitere
Informationen siehe Abschnitt D.69, „ODBC_funktionsname()“, speziell
Abschnitt D.69, „Beispiel für beliebige
SQL-Befehle:“.; abfragen:
exten => 123,1,Set(ARRAY(vn,nn)=${ODBC_SQL(SELECT `vorname`\, `nachname` FROM `liste` WHERE `nummer`='${SQL_ESC(123)}')})
; setzen:
exten => 123,1,Set(ODBC_SQL(UPDATE `liste` SET `name`='${SQL_ESC(Peter)}' WHERE `nummer`='${SQL_ESC(123)}')),“) im SQL-Befehl maskiert werden
müssen, also als „\,“ geschrieben
werden.| | | 1.4 |————————| 1.6 |————————
-= Info about function 'ODBC_SQL' =-
[Syntax]
ODBC_SQL(<arg1>[...[,<argN>]])
[Synopsis]
Runs the referenced query with the specified arguments
[Description]
Runs the following query, as defined in func_odbc.conf, performing
substitution of the arguments into the query as specified by ${ARG1},
${ARG2}, ... ${ARGn}. This function may only be read, not set.
SQL:
${ARG1}