intercept / intercept-database

A database library for Intercept
MIT License
14 stars 9 forks source link

Multiple connections #27

Closed th3-sh0w3r closed 4 years ago

th3-sh0w3r commented 4 years ago

Hey,

I have 2 databases and create connections to them like this:

DB_CONNECTION = dbCreateConnection (getText(missionConfigFile >> "DB" >> "db_account_name")); DB_CONNECTION_GLOBAL = dbCreateConnection (getText(missionConfigFile >> "DB" >> "db_account_name_global"));

If I now execute the first query on DB_CONNECTION, the server crashs and says that the given table name can't be found on the DB_CONNECTION_GLOBAL database. So it looks like it executes on the wrong connection, even if I execute it on the right.

This is the exact error: "MariaDB Error(1146): Table 'arma3globaltest.players' doesn't exist"

And yes I'm sure the table exists on the DB_CONNECTION database. Sometimes if I start the server it works and sometimes it just executes on the wrong connection.

Could you check this?

th3-sh0w3r commented 4 years ago

missionConfigFile was not loaded correctly and then InterceptDB automaticly took the global DB for both connections.