[asterisk-users] MYSQL grammar diff in 1.6.2.1?

Zhang Shukun bitzsk at gmail.com
Mon Jan 25 03:12:08 CST 2010


hi, dear all

MYSQL commands work well in 1.4.28 edition, but not in 1.6.21

is that the grammar is different between them?

extensions.conf

exten => s,2,MYSQL(Query resultid ${connid} SELECT\ callerid\ from\
blacklist\ where\ companycode = ${ARG2} and callerid=${ARG1} and
blockenabled = 1)

cli:
    -- Executing [s at macro-checkblacklist:2] MYSQL("SIP/1003-00000006",
"Query resultid 1 SELECT\ callerid\ from\ blacklist\ where\
companycode = 95040654321 and callerid=1003 and blockenabled = 1") in
new stack
[Jan 25 17:05:34] WARNING[2583]: app_addon_sql_mysql.c:374
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 '\ callerid\
from\ blacklist\ where\ companycode = 95040654321 and callerid=1003 '
at line 1


-- 
Best regards,
Sucan



More information about the asterisk-users mailing list