mysql_format - invalid connection handle
#1

When I'm registering my server i get this error log,
[Thu Apr 20 23:41:28 2017] -------------------------
[Thu Apr 20 23:41:28 2017] Logging Started
[Thu Apr 20 23:41:28 2017] -------------------------
[23:41:49] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:41:49] [WARNING] cache_get_row_count - no active cache
[23:41:49] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:41:49] [WARNING] cache_get_row_count - no active cache
[23:41:54] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:41:54] [WARNING] cache_get_field_content_int - no active cache
[23:42:14] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:42:34] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:42:54] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:43:14] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:43:34] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:43:54] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:44:14] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:44:34] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:44:54] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:45:14] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:45:31] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:45:34] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:45:54] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:46:14] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:46:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:46:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:47:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:47:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:47:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:48:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:48:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:48:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:49:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:49:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:49:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:50:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:50:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:50:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:51:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:51:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:51:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:52:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:52:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:52:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:53:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:53:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:53:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:54:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:54:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:54:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:55:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:55:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:55:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:56:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:56:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:56:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:57:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:57:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:57:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:58:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:58:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:58:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:59:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:59:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[23:59:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[00:00:15] [ERROR] mysql_format - invalid connection handle (id: 0)
[00:00:35] [ERROR] mysql_format - invalid connection handle (id: 0)
[00:00:55] [ERROR] mysql_format - invalid connection handle (id: 0)
[00:01:15] [ERROR] mysql_format - invalid connection handle (id: 0)

Here is my register code
if(dialogid == REGISTER_DIALOG)
{
if(!response)
{
Kick(playerid);
}
else if(response)
{
if(!inputtext[0])
{
ShowPlayerDialog(playerid, REGISTER_DIALOG, DIALOG_STYLE_INPUT, "Register..", "Welcome! Please Enter A Password To Register", "Register", "Cancel");
}
else if(inputtext[0])
{
pInfo[playerid][Register] = 1;
pInfo[playerid][Login] = 1;
mysql_format(mysql, query, sizeof(query), "INSERT INTO `users`(`Name`,`IP`,`Password`) VALUES ('%e','%e',md5('%s'))",pInfo[playerid][Name], pInfo[playerid][IP], inputtext);
mysql_query(mysql, query);
SendClientMessage(playerid, GREEN, "You have successfuly registered!");
LoadStats(playerid);
stats[playerid] = SetTimerEx("StatsSave", 20000, true, "i", playerid);
ShowPlayerDialog(playerid, TEAM_DIALOG, DIALOG_STYLE_LIST, "Choose Team..",""cblue"United Stats America\n"cgreen"Europe\n"cyellow"Arabian\n"csovie t"Soviet\n"cgermany"Germany\n"caust"Australia ","Select","");
}
}
}

thanks for the help!
Reply
#2

Are you sure that you have opened a valid handle on the "mysql" variable? It's either you aren't opening the connection or the connection was failed.
Reply
#3

thanks i fixed it already <3 + 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)