Executing LuaSql script via mysql proxy
I am a newbie to mysql-proxy.Is it possible to execute LuaSql scripts via mysql-proxy?I have tried the following code:
--connect.lua
mysql = require "luasql.mysql"
env = assert(mysql.mysql())
con = assert (env:connect ("db_name", "username", "password", "hostname", "3306"))
local cur = con:execute("select * from approval")
myTable[0] = 0
myTable = {}
row = cur:fetch(myTable, "a")
print(myTable.id,myTable.user)
Then i am getting the following error in my error log:
mysql.lua:8: bad argument #1 to 'insert' (table expected, got nil)
But when i execute the same code without mysql-proxy i am able to get the required data.Can anyone solve this issue ? Thanks in advance.
JerwinRoy
Subject
Views
Written By
Posted
Executing LuaSql script via mysql proxy
7044
July 04, 2014 10:42PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.