- Download and install the latest version of LuaCast from here: http://www.ffevo.net/topic/2868-luacast/?p=35134
- Download the attachment to this post and place the new folder with the dlls inside your LuaCast folder.
- Next, open your main.lua and add the following to the top:
Code: Select all
package.cpath = AshitaCore.AshitaInstallPath .. '\\Extensions\\LuaCast\\clibs\\?.dll;' .. package.cpath;
- Then you should be able to use LuaSQL with LuaCast.
Code: Select all
require "luasql.mysql"
local env = luasql.mysql(); -- Create MySQL object..
local con = assert(env:connect('dspdb', 'root', 'root', 'localhost'));
local chr = assert(con:execute("SELECT * FROM chars;"));
local data = { chr:fetch() };
while (data ~= nil) do
print( string.format( "%s: %s", data[1], data[3] ) );
data = { chr:fetch() };
if (data[1] == nil) then
break;
end
end