Open samlevi1981 opened 7 years ago
I have a mysql stored procedure like this:
_CREATE DEFINER=root@localhostPROCEDUREget_record`( In mKey varchar(300) ) BEGIN
CREATE DEFINER=
@
PROCEDURE
Select * from table_name where column_name = mkey;
END`_
And in LUA, I call it using the luasql.mysql:
_`local qry_str = "Call get_record('"..mkey.."')" cur = assert (con:execute(qry_str))
row = cur:fetch ({}, "a") `_ It returns the following error after executing it:
_LuaSQL: error executing query. MySQL: PROCEDURE dbname.get_record can't return a result set in the given context_
LuaSQL: error executing query. MySQL: PROCEDURE dbname.get_record can't return a result set in the given context
Calling that stored procedure in MySQL workbench works as expected.
Does luasql supports this type of procedure? And if it does, how do I call it via lua?
Thanks!
I have a mysql stored procedure like this:
_
CREATE DEFINER=
root@
localhostPROCEDURE
get_record`( In mKey varchar(300) ) BEGINSelect * from table_name where column_name = mkey;
END`_
And in LUA, I call it using the luasql.mysql:
_`local qry_str = "Call get_record('"..mkey.."')" cur = assert (con:execute(qry_str))
row = cur:fetch ({}, "a") `_ It returns the following error after executing it:
_
LuaSQL: error executing query. MySQL: PROCEDURE dbname.get_record can't return a result set in the given context
_Calling that stored procedure in MySQL workbench works as expected.
Does luasql supports this type of procedure? And if it does, how do I call it via lua?
Thanks!