MySQLoo module

Ok im trying to go to the new mysql module, but i got a problem.
It doesnt connect to the DB or somthing and i dont get a error.
[LUA]require(“mysqloo”)
print("#####################")
print("##MYSQL test loaded##")
print("#####################")
print("MySQLoo version: "…mysqloo.VERSION)
local DATABASE_HOST = “127.0.0.1”
local DATABASE_NAME = “”
local DATABASE_USERNAME = “”
local DATABASE_PASSWORD = “”

function printQuery(QueryData)
PrintTable(query:getData())
end

function PrintError(error_messege)
print(error_messege)
end

function AllInOneDB(MyQuery)
databaseObject = mysqloo.connect(DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, DATABASE_NAME)
print(“AllInOneDB function”)
print(MyQuery)
databaseObject.onConnected = function(MyQuery)
query1 = databaseObject:query(MyQuery)
query1.onData = function(Q,D) print(“Q1”) PrintTable(D) end
query1.onSuccess = printQuery
query1.onError = function(Q,E) print(“Q1”) print(E) end
query1:start()
print(databaseObject:status())
end
databaseObject:connect()
databaseObject.onConnectionFailed = PrintError
print(databaseObject)
end

AllInOneDB(“SELECT * FROM rp”)[/LUA]
Please help.

Firstly, you seem to use connect() before actually adding the fail function.

Secondly, the first argument in the error of mysqloo in the database is the database, the second argument is the error… All that I can see is wrong there though…

Basically, the function PrintError should be PrintError(db, error_messege)

oh will try, andyvincent didnt really show the db arg in the function list**
**