mysql_num_rows problem with mysql 2.1.1 version
#1



when i get this error
Код:
[MySQL] Error: Max connections (4) reached, could not connect.
my server just stop to work

Код:
stock IsPlayerRegistered(playername[])
{
   new szQuery[512];
   
   format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `username` = '%s'", playername);
   SendQuery(szQuery);

   mysql_store_result();
	new regm = mysql_num_rows();
	if (!regm){
		return false;
	}
	mysql_free_result();
   return 1;
}



public OnPlayerRequestSpawn(playerid)
{
   if (IsPlayerRegistered(PlayerName(playerid)) && PlayerInfo[playerid][LoggedIn] == false)
   {
SendNSMessage(playerid, COLOR_RED, "This nickname is registered, you must login before spawning. (/ns login)");
   }else{
	  SendNSMessage(playerid, COLOR_RED, "You must create register first. (/ns register)");
   }

   return 1;
}
Why mysql_num_rows returns nothing and why I reach max_connections?
Reply


Messages In This Thread
mysql_num_rows problem with mysql 2.1.1 version - by FasTLinE - 12.04.2015, 14:33
Re: mysql_num_rows problem with mysql 2.1.1 version - by MEW273 - 13.04.2015, 08:13
Re: mysql_num_rows problem with mysql 2.1.1 version - by FasTLinE - 13.04.2015, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)