sparktwinny / erlang-mysql-driver

Automatically exported from code.google.com/p/erlang-mysql-driver
Other
0 stars 0 forks source link

Mysql driver problem if sql query with semicolon #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Please find solution for below mysql driver ejabberd erlang

Input = <<"SET @rownum = 0; SELECT @row_number:=@row_number+1 AS 
row_number,a.name FROM uioptions as a">>.
mysql:fetch(p1,Input).

I am getting below error as output                                              

mysql_conn:433: fetch <<"SET @rownum = 0; SELECT @row_number:=@row_number+1 AS 
row_number,a.name FROM uioptions as a">> (id <0.232.0>)
{error,{mysql_result,[],[],0,0,
                     "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 'SELECT @row_number:=@row_number+1 AS row_number,a.name FROM uioptions as a' at line 1",
                     1064,"42000"}}

Original issue reported on code.google.com by edukonda...@gmail.com on 3 Jul 2015 at 11:27