Hi there, is it possible to export a mysql handler to other resources so it can be used for mysql_query function? I tried to do that bit of code but it does not work out for me:
mysql resource lua file:
function start()
mysql = mysql_connect("localhost", "root", "", "mta")
if mysql then
return mysql
end
end
mysql meta file:
<script src="mysql.lua" type="server" />
<export function="start" type="server" />
and I use it in other resources like this:
handler = exports["mysql"]:start()
and this does not work.