I am new to this freepbx. when i try to connect mysql from freepbx i am getting error message.
" pbx_extension_helper: No application ‘MYSQL’ for extension".
Hi finally i installed asterisk add-on app_mysql.so .
When i try to connect i am getting some error message
my mysql version is 14.11
MYSQL(“SIP/2009-0000000c”, “Connect connid 127.0.0.1 root ****** asterisk”) in new stack
MYSQL(“SIP/2009-0000000c”, “Query resultid 1 SELECT\ dest\ FROM\ ivr_entries\ WHERE\ selection=\2”) in new stack
WARNING[4680][C-0000000c]: app_mysql.c:405 aMYSQL_query: aMYSQL_query: mysql_query failed. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘\ dest\ FROM\ ivr_entries\ WHERE\ selection=\2’ at line 1
MYSQL(“SIP/2009-0000000c”, “Fetch fetchid test”) in new stack
WARNING[4680][C-0000000c]: app_mysql.c:506 aMYSQL_fetch: aMYSQL_fetch: missing some arguments
Executing [s@dbconntest:11] MYSQL(“SIP/2009-0000000c”, “Disconnect 1”) in new stack
How to find out the correct syntax for my mysql version.
SELECT dest FROM ivr_entries WHERE selection = "2"
or
SELECT dest from ivr_entries WHERE selection = 2
The difference is whether the selection field is a CHAR or an INT. The first should work for either, the second should only work if the field is an INT.