jonas kellens
2009-Aug-30 12:11 UTC
[asterisk-users] MySQL syntax error : I really don't see where...
Hi list, I'm stuck for the moment @ the following : My Query (in a macro) : exten => s,n,MYSQL(Query resultid ${connid} SELECT\ vakantie_set\ vakantie_data1\ vakantie_data2\ FROM\ AstDB\ where\ SIPACCOUNT="${ARG1}") Asterisk CLI : [Aug 30 14:07:42] -- Executing [s at macro-vakantie:2] MYSQL("IAX2/zoiper-9238", "Query resultid 1 SELECT vakantie_set vakantie_data1 vakantie_data2 FROM AstDB where SIPACCOUNT="092779077"") in new stack [Aug 30 14:07:42] WARNING[26029]: app_addon_sql_mysql.c:335 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 'vakantie_data2 FROM AstDB where SIPACCOUNT="092779077"' at line 1 Greetingz, Jonas. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090830/8840de37/attachment.htm
Doug Lytle
2009-Aug-30 12:34 UTC
[asterisk-users] MySQL syntax error : I really don't see where...
jonas kellens wrote:> Hi list, > > I'm stuck for the moment @ the following : > > My Query (in a macro) : > > exten => s,n,MYSQL(Query resultid ${connid} SELECT\ vakantie_set\ > vakantie_data1\ vakantie_data2\ FROM\ AstDB\ where\ SIPACCOUNT="${ARG1}") >exten => s,n,MYSQL(Query resultid ${connid} SELECT vakantie_set \, vakantie_data1 \, vakantie_data2 FROM AstDB WHERE SIPACCOUNT = ${ARG1}) Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Per Jessen
2009-Aug-30 12:43 UTC
[asterisk-users] MySQL syntax error : I really don't see where...
jonas kellens wrote:> [Aug 30 14:07:42] -- Executing [s at macro-vakantie:2] > MYSQL("IAX2/zoiper-9238", "Query resultid 1 SELECT vakantie_set > vakantie_data1 vakantie_data2 FROM AstDB where > SIPACCOUNT="092779077"") in new stack > [Aug 30 14:07:42] WARNING[26029]: app_addon_sql_mysql.c:335 > 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 'vakantie_data2 FROM AstDB where SIPACCOUNT="092779077"' at line > 1You need to separate the selected columns with commas. /Per Jessen, Z?rich -- http://www.spamchek.com/ - your spam is our business.