<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Verdana","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D'>Faisal<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Felipe Figueiredo<br><b>Sent:</b> Friday, February 18, 2011 11:04 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> [asterisk-users] Fwd: cmd MySQL<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>---------- Forwarded message ----------<br>From: <b>Felipe Figueiredo</b> <<a href="mailto:felipe.figueiredo86@gmail.com">felipe.figueiredo86@gmail.com</a>><br>Date: Fri, Feb 18, 2011 at 4:03 PM<br>Subject: Re: [asterisk-users] cmd MySQL<br>To: Gerald A <<a href="mailto:geraldablists@gmail.com">geraldablists@gmail.com</a>><br><br><o:p></o:p></p><div><div><p class=MsoNormal>- Executing [200@teste:2] MYSQL("Console/dsp", "Query resultid 1 SELECT\ ramal\ FROM\ colaboradores\ WHERE\ ramal=200") in new stack<o:p></o:p></p></div></div><div><p class=MsoNormal>[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<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>hi Gerald, <o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>look, the error is the same. Eveng changing the "/" for "\" ... <o:p></o:p></p></div><div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Feb 18, 2011 at 4:00 PM, Gerald A <<a href="mailto:geraldablists@gmail.com" target="_blank">geraldablists@gmail.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Hi Felipe,<o:p></o:p></p><div><div><p class=MsoNormal>On Fri, Feb 18, 2011 at 12:56 PM, Felipe Figueiredo <<a href="mailto:felipe.figueiredo86@gmail.com" target="_blank">felipe.figueiredo86@gmail.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>-- Executing [200@teste:2] MYSQL("Console/dsp", "Query resultid 1 SELECT/ ramal/ FROM/ colaboradores/ WHERE/ ramal=200") in new stack<o:p></o:p></p></div><div><p class=MsoNormal>[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<o:p></o:p></p></div></div></div><div><p class=MsoNormal><br>I'm not Asterisk-MySQL guru, but shouldn't the "/" be "\"?<br><br>I'm guessing you are trying to keep a string together here, but maybe I'm mistaken.<br><br>Thanks,<br>Gerald<o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>