PtokaX forum

Development Section => Your Developing Problems => Topic started by: Stanton on 20 July, 2005, 22:40:58

Title: LUA5 connect and write to mysql dbase
Post by: Stanton on 20 July, 2005, 22:40:58
Hey guys, complete n00b here, please bear with me.

Ive been searching this forum for hours but cant seem to find the right information, im under the impression that LUA5 supports connections to mysql dbases? can anyone please point me to any information about this?

Im not looking to be spoon fed, and am more than willing to read up on the necessary info and learn what i need, but i am in need of a push in the right direction, lol.

What im looking at doing is writing a script that will sit in a hub and look for any kick/bans, and if so, write the information (user, date/time, reason) to the dbase for our mods to review.

Any help, guidance, information gladly received :)

contact info in profile.

Many Thanks
Stanton.
Title:
Post by: Ivan Von Girderboot on 13 October, 2005, 23:46:18
To my knoledge, LUA5 does not support MySQL or any ODBC Drivers.

There are ways around it, but it's not simple.  For instance, my chat all gets logged to a MySQL db, via a sql file that gets imported into MySQL via a command line.
Title:
Post by: bastya_elvtars on 13 October, 2005, 23:54:06
LuaSQL?

http://www.keplerproject.org/luasql/
Title:
Post by: Pothead on 14 October, 2005, 09:24:32
BlueBear has recently posted a link to a Sqlite interface for PtokaX Lua.  So i suggest you use that.  
Or compile MySql including PXLua.lib and a LUA wrapper class.
Title:
Post by: bluebear on 14 October, 2005, 10:08:22
Yes, PxSQLite3 can be used.

I'm also looking into builing some Lua wrapper for MySQL. It will probably be LuaSQL.

I will create a thread, in "LUA & PtokaX-Scripting-Interface" wich you peeps can use to request extensions for ptokax.

The thread http://board.univ-angers.fr/thread.php?threadid=5448&boardid=5&styleid=1&page=1#1 (http://board.univ-angers.fr/thread.php?threadid=5448&boardid=5&styleid=1&page=1#1)
Title:
Post by: bluebear on 14 October, 2005, 19:06:46
MySQL access for Ptokax Lua is here now: http://board.univ-angers.fr/thread.php?threadid=5451&boardid=5&styleid=1 (http://board.univ-angers.fr/thread.php?threadid=5451&boardid=5&styleid=1)