29.06.2012, 19:12
Now i see a lot of times i get connect to mysql database, but i connect just when game mode is on.. look:
How this can possible twice connections
Here is my connect to mysql:
Код:
[22:03:34] [22:03:34] --------------------------- [22:03:34] MySQL Debugging activated (06/29/12) [22:03:34] --------------------------- [22:03:34] [22:03:34] >> mysql_connect( ) [22:03:34] CMySQLHandler::CMySQLHandler() - constructor called. [22:03:34] CMySQLHandler::CMySQLHandler() - Connecting to "NA" | DB: "NA" | Username: "NA" ... [22:03:34] CMySQLHandler::Connect() - Connection was successful. [22:03:34] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [22:03:34] >> mysql_ping( Connection handle: 1 ) [22:03:34] CMySQLHandler::Ping() - Connection is still alive. [22:06:42] >> mysql_query( Connection handle: 1 ) [22:06:42] CMySQLHandler::Query(SELECT * FROM `players2` WHERE `Name` = 'NNN') - Successfully executed. [22:06:42] >> mysql_store_result( Connection handle: 1 ) [22:06:42] CMySQLHandler::StoreResult() - Result was stored. [22:06:42] >> mysql_num_rows( Connection handle: 1 ) [22:06:42] CMySQLHandler::NumRows() - Returned 1 row(s) [22:06:42] >> mysql_num_rows( Connection handle: 1 ) [22:06:42] CMySQLHandler::NumRows() - Returned 1 row(s) [22:06:42] >> mysql_free_result( Connection handle: 1 ) [22:06:42] CMySQLHandler::FreeResult() - Result was successfully free'd. [22:07:15] >> mysql_query( Connection handle: 1 ) [22:07:15] CMySQLHandler::Query(SELECT * FROM `players2` WHERE `Name` = 'NNN' AND `password` = 'NNNN') - Successfully executed. [22:07:15] >> mysql_store_result( Connection handle: 1 ) [22:07:15] CMySQLHandler::StoreResult() - Result was stored. [22:07:15] >> mysql_num_rows( Connection handle: 1 ) [22:07:15] CMySQLHandler::NumRows() - Returned 1 row(s) [22:07:15] >> mysql_free_result( Connection handle: 1 ) [22:07:15] CMySQLHandler::FreeResult() - Result was successfully free'd. [22:09:08] [22:09:08] --------------------------- [22:09:08] MySQL Debugging activated (06/29/12) [22:09:08] --------------------------- [22:09:08] [22:09:08] >> mysql_connect( ) [22:09:08] CMySQLHandler::CMySQLHandler() - constructor called. [22:09:08] CMySQLHandler::CMySQLHandler() - Connecting to "NA" | DB: "NA" | Username: "NA" ... [22:09:08] CMySQLHandler::Connect() - Connection was successful. [22:09:08] CMySQLHandler::Connect() - Auto-Reconnect has been enabled. [22:09:08] >> mysql_ping( Connection handle: 1 ) [22:09:08] CMySQLHandler::Ping() - Connection is still alive.
Here is my connect to mysql:
Код:
public OnGameModeInit() { mysql_debug(1); //enable debug mysql_connect( MySQL_HOST,MySQL_USER,MySQL_DATA,MySQL_PASS ); if( mysql_ping( ) >= 1 ) { print( "CONNECTION TO MYSQL WAS SUCEFFULY" ); } else { print( "PLEASE ON MSQL!" ); } }