Thread Tools Display Modes
Prev Previous Post   Next Post Next
04/10/14, 07:40 PM   #1
Cordain
Join Date: Apr 2014
Posts: 3
Include external files/ database connection?

Please help. I have a lua script that uses luaSQL for database connection. It works as a stand alone lua script but not when used in an addon.

example code:
Code:
mysql = require "libmysql.mysql"
local env  = mysql.mysql()
local conn = env:connect('DB-NAME','DB-USERNAME,'PASSWORD','DB-IP-ADDRESS,'PORT NUMBER')
it throws an error "Function expected instead of nil" at this line
Code:
mysql = require "libmysql.mysql"
Anyone have suggestions on connecting to external database?

an alternative would be to have addon POST to a my server side php file to handle database update but I have no idea how to do this either.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Include external files/ database connection?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off