
Hey guys,
You know guys, DC released the new version of CS2D, which supports LuaJIT. However there are some bugs, i got worked MySQL connection.

Simple connection for CS2D to MySQL Server via LuaJIT's SQL module. On the server start the script query version of the MySQL server, so connection works fine
I must say its works pretty fast, queries are like the lightning.





Links:
LuaJIT: http://luajit.org
LuaPower: https://luapower.com/mysql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
function version() 	local mysql = require'mysql' 	local conn = mysql.connect('localhost', 'root', 'football', 'mysql', 'utf8') 	local server_version = conn:server_info() 	local contype = conn:server_version() 	local host = conn:host_info() 	print('©000255000Your MySQL Server version is: ' .. server_version) 	print('©000255000Your MySQL HOST: ' .. host) end version()

edited 1×, last 22.06.15 12:15:20 pm