[asterisk-users] Fwd: cmd MySQL

Faisal Hanif faisal at vopium.com
Fri Feb 18 12:26:04 CST 2011


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: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] 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 <felipe.figueiredo86 at gmail.com>
Date: Fri, Feb 18, 2011 at 4:03 PM
Subject: Re: [asterisk-users] cmd MySQL
To: Gerald A <geraldablists at gmail.com>



- Executing [200 at 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 <geraldablists at gmail.com> wrote:

Hi Felipe,

On Fri, Feb 18, 2011 at 12:56 PM, Felipe Figueiredo
<felipe.figueiredo86 at gmail.com> wrote:

 

-- Executing [200 at 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

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110218/c087b5b2/attachment.htm>


More information about the asterisk-users mailing list