Mysql - (error #1064)
#5

I really appreciate your help guys with me
Problem fixed!

If we looked at this code we can see that there exist two errors :
- the first one, which is calling
Код:
....(error #1064)
- the second
Код:
(....WHERE ID = 0)
# ID = 1 (Which is my ID on database)

Solution :
- Remplaced by :
Код:
UPDATE `srv_users` SET `Niveau` = '%d', `Respect` = '%d', `ServiceMinute` = '%d', `MinExp` = '%d', `AdminLevel`= '%d', `Banexp`= '%d', `Banm`= '%d', `Bany`= '%d', `Banhour`= '%d', `Banmin` = '%d', `RaisonBanni` = '%s', `VIP` = '%d', `Rename` = '%d' WHERE `ID` = '%d'
-
Before :

Код:
public CheckAccount(playerid) //That's the public I call when a player is connecting to check if he's/not registred
{
	new rows,
	fields,
	string[144];

	cache_get_data(rows, fields);
	if(!rows)
	{
		//Not registred
	}
	else //Reigstred, so we're going to load his information
	{
        	PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID"); 
        }
	return 1;
}
The correct one :

Код:
public CheckAccount(playerid) //That's the public I call when a player is connecting to check if he's/not registred
{
	new rows,
	fields,
	string[144];

	cache_get_data(rows, fields);
	if(!rows)
	{
		//Not registred
	}
	else //Reigstred, so we're going to load his information
	{
		for(new iSlot, count_nb = cache_get_row_count(); iSlot < count_nb; iSlot++)
		{
        		PlayerInfo[playerid][pID] = cache_get_field_content_int(iSlot, "ID");
        	}
	}
	return 1;
}
Reply


Messages In This Thread
Mysql - (error #1064) - by Maximun - 04.02.2018, 18:55
Re: Mysql - (error #1064) - by JasonRiggs - 04.02.2018, 19:38
Re: Mysql - (error #1064) - by Maximun - 04.02.2018, 20:30
Re: Mysql - (error #1064) - by Mugala - 04.02.2018, 21:29
Re: Mysql - (error #1064) - by Maximun - 04.02.2018, 22:54
Re: Mysql - (error #1064) - by Misiur - 05.02.2018, 17:02

Forum Jump:


Users browsing this thread: 1 Guest(s)