18.09.2010, 19:33
(
Последний раз редактировалось VIRUXE; 18.09.2010 в 19:51.
)
Hi there,
I'm creating a filterscript for my server and that filterscript uses a different database connection than my gamemode.
The thing is that the filterscript and gamemode connection are working fine but since the filterscript loads first, when a query from the gamemode gets executed it executes the query using the filterscript's database and not the gamemode's one.
Here is an example of what I'm saying:
[20:28:13] >> mysql_connect( )
[20:28:13] CMySQLHandler::CMySQLHandler() - constructor called.
[20:28:13] -- Connecting to "x" | DB: "x" | Username: "x" ...
[20:28:13] CMySQLHandler::Connect() - Connection was successful.
[20:28:13] >> mysql_ping( Connection handle: 1 )
[20:28:13] CMySQLHandler::Ping() - Connection is still alive.
[20:28:13] >> mysql_connect( )
[20:28:13] CMySQLHandler::CMySQLHandler() - constructor called.
[20:28:13] -- Connecting to "y" | DB: "y" | Username: "y" ...
[20:28:13] CMySQLHandler::Connect() - Connection was successful.
[20:28:13] >> mysql_query( Connection handle: 1 )
[20:28:14] CMySQLHandler::Query(SELECT id, x,y,z, objectid FROM lockers ORDER BY id ASC) - An error has occured. (Error ID: 1146, Table 'x.lockers' doesn't exist)
[20:28:14] >> mysql_store_result( Connection handle: 1 )
[20:28:14] CMySQLHandler::StoreResult() - No data to store.
[20:28:14] >> mysql_fetch_row_format( Connection handle: 1 )
[20:28:14] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[20:28:14] >> mysql_free_result( Connection handle: 1 )
[20:28:14] CMySQLHandler::FreeResult() - The result is already empty.
Does anyone know a solution for this?
Thanks.
I'm creating a filterscript for my server and that filterscript uses a different database connection than my gamemode.
The thing is that the filterscript and gamemode connection are working fine but since the filterscript loads first, when a query from the gamemode gets executed it executes the query using the filterscript's database and not the gamemode's one.
Here is an example of what I'm saying:
[20:28:13] >> mysql_connect( )
[20:28:13] CMySQLHandler::CMySQLHandler() - constructor called.
[20:28:13] -- Connecting to "x" | DB: "x" | Username: "x" ...
[20:28:13] CMySQLHandler::Connect() - Connection was successful.
[20:28:13] >> mysql_ping( Connection handle: 1 )
[20:28:13] CMySQLHandler::Ping() - Connection is still alive.
[20:28:13] >> mysql_connect( )
[20:28:13] CMySQLHandler::CMySQLHandler() - constructor called.
[20:28:13] -- Connecting to "y" | DB: "y" | Username: "y" ...
[20:28:13] CMySQLHandler::Connect() - Connection was successful.
[20:28:13] >> mysql_query( Connection handle: 1 )
[20:28:14] CMySQLHandler::Query(SELECT id, x,y,z, objectid FROM lockers ORDER BY id ASC) - An error has occured. (Error ID: 1146, Table 'x.lockers' doesn't exist)
[20:28:14] >> mysql_store_result( Connection handle: 1 )
[20:28:14] CMySQLHandler::StoreResult() - No data to store.
[20:28:14] >> mysql_fetch_row_format( Connection handle: 1 )
[20:28:14] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Empty Result)
[20:28:14] >> mysql_free_result( Connection handle: 1 )
[20:28:14] CMySQLHandler::FreeResult() - The result is already empty.
Does anyone know a solution for this?
Thanks.