If you are using asterisk 1.8.x you don't need to type \ for spaces you can write simple query and use spaces as normal it will work fine.
Faisal From: [email protected] [mailto:[email protected]] On Behalf Of Felipe Figueiredo Sent: Friday, February 18, 2011 11:04 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Fwd: cmd MySQL ---------- Forwarded message ---------- From: Felipe Figueiredo <[email protected]> Date: Fri, Feb 18, 2011 at 4:03 PM Subject: Re: [asterisk-users] cmd MySQL To: Gerald A <[email protected]> - Executing [200@teste:2] MYSQL("Console/dsp", "Query resultid 1 SELECT\ ramal\ FROM\ colaboradores\ WHERE\ ramal=200") in new stack [Feb 18 16:01:42] WARNING[7749]: app_mysql.c:393 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 '\ ramal\ FROM\ colaboradores\ WHERE\ ramal=200' at line 1 hi Gerald, look, the error is the same. Eveng changing the "/" for "\" ... On Fri, Feb 18, 2011 at 4:00 PM, Gerald A <[email protected]> wrote: Hi Felipe, On Fri, Feb 18, 2011 at 12:56 PM, Felipe Figueiredo <[email protected]> wrote: -- Executing [200@teste:2] MYSQL("Console/dsp", "Query resultid 1 SELECT/ ramal/ FROM/ colaboradores/ WHERE/ ramal=200") in new stack [Feb 18 15:55:13] WARNING[7696]: app_mysql.c:393 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 '/ ramal/ FROM/ colaboradores/ WHERE/ ramal=200' at line 1 I'm not Asterisk-MySQL guru, but shouldn't the "/" be "\"? I'm guessing you are trying to keep a string together here, but maybe I'm mistaken. Thanks, Gerald
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
