MySQLoo Help!

Hello, I downloaded the MySQLoo module since I needed it for storing logs online and be able to show them on my website so my admins can see them in real-time.
The logging system I’m using: SLA - Simple Logging Addon (File/SQLite/MySQL)

The databases is all set and I’ve spoken to the host and he gave me the correct information for the database, username and password and everything. Included the port.
I get this error when I boot the server up:


error loading module 'mysqloo' from file 'BLAH BLAH BLAH ETC ETC\orangebox\garrysmod\lua\includes\modules\gmsv_mysqloo.dll':
	Module not found



.---.  ,       ,.  
\___   )      / |  
    \ /      /~~|-.
`---' `--' ,'   `-'
Simple Logging Addon V1 Loaded!

This is the code there is to set everything up and all that shiet… Idk why it isn’t working… The creator of this addon has been banned though…


// SLA - Simple Logging Addon - Seth

SLA.DataTypes.MySQL = {
	Enabled = true,
	
	Host = 'IPGOESHERE',
	Db = 'DATABASENAMEGOESHERE',
	User = 'USERNAME',
	Pass = 'PASSWORD',
	Port = 3306
};

if(!SLA.DataTypes.MySQL.Enabled) then return; end

if(!require('mysqloo')) then
	SLA.DataTypes.MySQL.Enabled = false;
	print('SLA - Please install mysqloo module correctly!');
	return;
end

SLA.DB = mysqloo.connect(SLA.DataTypes.MySQL.Host, SLA.DataTypes.MySQL.User, SLA.DataTypes.MySQL.Pass, SLA.DataTypes.MySQL.Db, SLA.DataTypes.MySQL.Port);

SLA.DB.onConnected = function(self)
	print('SLA - Connected to MySQL!');
	
	local qy = SLA.DB:query([[
	CREATE TABLE IF NOT EXISTS `sla_logs` (
	`unixtime` INT NULL DEFAULT '0',
	`nicetime` VARCHAR(50) NULL DEFAULT '0',
	`msg` VARCHAR(1000) NULL DEFAULT '0'
	)]]);
	
	function qy.onError(self, err)
		print('SLA - Query failed:', err);
	end
	
	qy:start();
end

SLA.DB.onConnectionFailed = function(self, err)
	print('SLA - MySQL connection failed:', err);
end


function SLA.LogToMySQL(msg)
	if(SLA.DataTypes.MySQL.Enabled) then
		if(SLA.DB:status() != mysqloo.DATABASE_CONNECTED) then
			print('SLA - Attempted to run MySQL query with no database connection!');
			return;
		end
		
		local qy = SLA.DB:query(string.format("INSERT INTO `sla_logs`(`unixtime`, `nicetime`, `msg`) VALUES('%s', '%s', '%s')", os.time(), os.date('%m/%d/%y %H:%M:%S'), SLA.DB:escape(msg)));
		
		function qy.onError(self, err)
			print('SLA - Query failed:', err);
		end
		
		qy:start();
	end
end

SLA.DB:connect();

Thanks in Advance!

Regards, Sven.

Have you actually installed the mysqloo module?

Yes I have. It is in its correct folders, here’s the structure:


root/libmySQL.dll
root/lua/includes/modules/gmcl_mysqloo.dll
root/lua/includes/modules/gmsv_mysqloo.dll
root/lua/test/run.lua

libmysql should be in the orangebox/garrysmod folder.

Oh I see… I now get an error when I removed all the files:


[gamemodes\darkrp\gamemode\init.lua:95] attempt to index global 'sql' (a nil value)

and everything is broken…

Your Best bet would be to just re-SVN DarkRP

Deadman123, I patched the server and it looked like I accidently removed the .dll of the mysqlite that is there. Problem is solved. Thanks for your support anyways.

Ok