Mysql row not created
#1

The problem is when a player registers, a unique row is not created. Only 1 player row is created in the db, after that a next player registers, row is not created ...

this is my code !
Код:
MySQLregister(playerid, params[])
{
	new password[130];
	mysql_escape_string(params,password);
	new str[128];
	
    mysql_format(mysql,str,sizeof(str),"INSERT INTO `users` (`Name`, `Pass`) VALUES ('%s', '%s')",PlayerName(playerid),password);
	mysql_function_query(mysql,str,false,"","");
 FieldID[playerid] = cache_insert_id(mysql); 
	//--------------------------------------------------
	SendLangMessage(playerid, _COLOR_YELLOW, "Account wurde erstellt:","Account was created:","Tu cuenta ha sido creada:");
	switch(Sprache[playerid])
	{
		case 0: format(str, sizeof(str), "Passwort: \"%s\"",password);
		case 1: format(str, sizeof(str), "Password: \"%s\"",password);
		case 2: format(str, sizeof(str), "Contrasena: \"%s\"",password);
	}
	SendClientMessage(playerid, _COLOR_GREEN, str);
	SendLangMessage(playerid, _COLOR_GREEN, "Du wurdest eingeloggt!","You are logged in!","Has iniciado sesi鏮!");
	GivePlayerCash(playerid,10000);
	GiveClanCash(playerid,10000);
	LoggedIn[playerid] = 1;
	mysql_format(mysql,str, sizeof(str), "SELECT * FROM `users` WHERE Name = '%s'",PlayerName(playerid));
	mysql_function_query(mysql,str,true,"","");
    return 1;
}
Reply


Messages In This Thread
Mysql row not created - by DetoNater - 10.06.2015, 09:22
Re: Mysql row not created - by Konstantinos - 10.06.2015, 09:27
Re: Mysql row not created - by DetoNater - 10.06.2015, 09:47
Re: Mysql row not created - by DetoNater - 10.06.2015, 12:46
Re: Mysql row not created - by mamorunl - 10.06.2015, 14:04
Re: Mysql row not created - by DetoNater - 10.06.2015, 14:35
Re: Mysql row not created - by mamorunl - 11.06.2015, 07:35
Re: Mysql row not created - by DetoNater - 11.06.2015, 09:48

Forum Jump:


Users browsing this thread: 1 Guest(s)