mysql = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_DATABASE, MYSQL_PASSWORD); if(mysql_errno() != 0) { printf("[MYSQL] The connection has failed."); } else { printf("[MYSQL] The connection has successful."); } |
mysql_format(mysql, query, sizeof(query),"INSERT INTO `users` (`Name`) VALUES ('%s')", pInfo[playerid][Name]); |
[16:00:02] [MYSQL] The connection has successful. |
[16:00:02] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "Server", password: "****", port: 3306, autoreconnect: true, pool_size: 2 [16:00:02] [DEBUG] CMySQLHandle::Create - creating new connection.. [16:00:02] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called [16:00:02] [DEBUG] CMySQLHandle::Create - connection created (id: 1) [16:00:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [16:00:02] [DEBUG] CMySQLConnection::Connect - connection was successful [16:00:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [16:00:02] [DEBUG] mysql_errno - connection: 1 [16:00:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [16:00:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [16:00:02] [DEBUG] CMySQLConnection::Connect - establishing connection to database... [16:00:02] [DEBUG] CMySQLConnection::Connect - connection was successful [16:00:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [16:00:02] [DEBUG] CMySQLConnection::Connect - connection was successful [16:00:02] [DEBUG] CMySQLConnection::Connect - connection was successful [16:00:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [16:00:02] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled [16:02:07] [DEBUG] mysql_format - connection: 1, len: 128, format: "INSERT INTO `users` (`Name`) VALUES ('%s')" |
Name[MAX_PLAYER_NAME],
GetPlayerName(playerid, pInfo[playerid][Name], MAX_PLAYER_NAME);