08.11.2016, 08:23
hey.. it not work!
i have LM4 reactor lite
all lib install successful
here is my script
require("luasql.mysql");
env = assert(luasql.mysql());
log(env); -- // answer is "MySQL environment (0xb6ed5fa0)"
dbcon = env:connect('base_test', 'root','pass', '192.168.1.40');
log(dbcon); -- // answer is "nil"
cursor = dbcon:execute ( 'INSERT INTO devices (name) VALUES (\"test1\")' );
dbcon:close();
env:close();
i have LM4 reactor lite
all lib install successful
here is my script
require("luasql.mysql");
env = assert(luasql.mysql());
log(env); -- // answer is "MySQL environment (0xb6ed5fa0)"
dbcon = env:connect('base_test', 'root','pass', '192.168.1.40');
log(dbcon); -- // answer is "nil"
cursor = dbcon:execute ( 'INSERT INTO devices (name) VALUES (\"test1\")' );
dbcon:close();
env:close();