Hi guys, <div><br></div><div>I&#39;m trying to connect Asterisk to the MySQL, but I can&#39;t execute it. It returns an error, as below:</div><div><div><br></div><div>-- Executing [200@teste:2] MYSQL(&quot;Console/dsp&quot;, &quot;Query resultid 1 SELECT/ ramal/ FROM/ colaboradores/ WHERE/ ramal=200&quot;) in new stack</div>
<div>[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 &#39;/ ramal/ FROM/ colaboradores/ WHERE/ ramal=200&#39; at line 1</div>
</div><div><br></div><div>Its seems it can connect to mysql</div><div><br></div><div><br></div><div>My extension (AEL) is:</div><div><div><br></div><div>                MySQL(Connect conn_id localhost root 123456 crm);</div>
<div>                MySQL(Query resultid ${conn_id} SELECT/ ramal/ FROM/ colaboradores/ WHERE/ ramal=${EXTEN});</div><div>                MySQL(Fetch fetchid ${resultid} RAMAL);</div><div>                MySQL(Clear ${fetchid});</div>
<div>                MySQL(Disconnect ${connid});</div><div>                MySQL(Clear ${connid});</div><div>                NoOp(${RAMAL});</div></div><div><br></div><div><br></div><div><br></div><div>Where is the error? Thanks!!</div>
<div><br></div><div><br></div><div><br></div><div>The MySQL server is in the same server where Asterisk is running. </div><div><br></div><div>Thanks!!!</div>