On Mon, Jan 09, 2012 at 10:09:40AM +0200, Eyal wrote:
> On Monday, January 09, 2012 9:56 AM, James Sharp wrote:
> > On 01/09/2012 02:44 AM, Eyal wrote:
> > > Hi,
> > > I try to create a new table using MYSQL command in asterisk.
> > > This is what i write:
> > > *Query resultid ${connid} CREATE TABLE IF NOT EXISTS "conference_600"
> > > ("id" int(11) NOT NULL auto_increment, "channel_id" varchar(40),
> > > "number_in_line" int(2), PRIMARY KEY("id")")*
> > > and this is the warning that i get in the cli:
> > > *app_addon_sql_mysql.c:383 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 '"conference_600" ("id" int(11) NOT NULL auto_increment,
> > > "channel_id" varchar(40)' at line 1
> > > *
> > > What is the problem do you think?
> > > Do I in the direction or have a completely different way to do this?
> > 
> > That's a MySQL syntax error, not an Asterisk error.  However, the 
> > solution is to not put quotes around your table and field names.  That 
> > will make MySQL happy.
>
> Thanks
> But that's not the problem, I also tried without the quotes and still
> the error appears only this time it is like this
> app_addon_sql_mysql.c:383 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 '' at line 1

And you tested that query outside of Asterisk?

BTW: why would you create a table from within the Asterisk dialplan?

-- 
               Tzafrir Cohen
icq#16849755              jabber:[email protected]
+972-50-7952406           mailto:[email protected]
http://www.xorcom.com  iax:[email protected]/tzafrir

--
_____________________________________________________________________
-- 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

Reply via email to