Thread Tools Display Modes
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
04/10/14, 07:59 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
ESO is a sandbox. The i/o libraries are not included in this version of Lua.
  Reply With Quote
04/10/14, 08:26 PM   #3
Cordain
Join Date: Apr 2014
Posts: 3
Seerah- can they be included in some fassion. Or am i walking on a dead steet?
  Reply With Quote
04/10/14, 08:33 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Dead end street. ESO is a sandbox on purpose.
  Reply With Quote
04/10/14, 08:37 PM   #5
Cordain
Join Date: Apr 2014
Posts: 3
Thanks for the help, and for crushing my hopes and dreams
  Reply With Quote
04/10/14, 08:39 PM   #6
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
No problem!
  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