Error with MYSQL and Toys
#1

Hello there! I am using a system to save a Toys and i have this problem..


Log
Код:
MYSQL - 	ERRORID: 1064
Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE `Nombre` = Steven_Dominguez' at line 1
Query: WHERE `Nombre` = Steven_Dominguez
Callback: OnQueryFinish
Script code:

Код:
stock ActualizarAccesorios(playerid, slot=-1)
{
	if(slot == -1)
	{
		Loop(i, MAX_ACCESORIOS, 0)
		{
			ActualizarAccesorios(playerid, i);
		}
	}
	else if(slot > -1 && slot < MAX_ACCESORIOS)
	{
		new
			querystr [300] = "UPDATE `usuarios` SET ",
			str [500];

		A_Format (str, "`AttachModel_%d` = %d,", slot, InfoJugador[playerid][jAttachModel][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachBone_%d` = %d,", slot, InfoJugador[playerid][jAttachModel][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachPosx_%d` = %f,", slot, InfoJugador[playerid][jAttachPosx][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachPosy_%d` = %f,", slot, InfoJugador[playerid][jAttachPosy][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachPosz_%d` = %f,", slot, InfoJugador[playerid][jAttachPosz][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachAngx_%d` = %f,", slot, InfoJugador[playerid][jAttachAngx][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachAngy_%d` = %f,", slot, InfoJugador[playerid][jAttachAngy][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachAngz_%d` = %f,", slot, InfoJugador[playerid][jAttachAngz][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachEscx_%d` = %f,", slot, InfoJugador[playerid][jAttachEscx][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachEscy_%d` = %f,", slot, InfoJugador[playerid][jAttachEscy][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachEscz_%d` = %f,", slot, InfoJugador[playerid][jAttachEscz][slot]);
		strcat (querystr, str);

		A_Format (str, "`AttachOcultado_%d` = %d ", slot, InfoJugador[playerid][jAttachOcultado][slot]);

		A_Format (str, "WHERE `Nombre` = %s", pName (playerid));
		strcat (querystr, str);
		opmysql_tquery(str, "OnQueryFinish", "ii", playerid, query_type_unknown);
	}
	return 1;
}
I need a answer, i didn't find the correct form
Reply


Messages In This Thread
Error with MYSQL and Toys - by Dello - 04.09.2017, 22:25
Re: Error with MYSQL and Toys - by Meller - 04.09.2017, 22:29
Respuesta: Error with MYSQL and Toys - by Dello - 05.09.2017, 00:02
Re: Error with MYSQL and Toys - by Luke_James - 05.09.2017, 00:09
Respuesta: Error with MYSQL and Toys - by Dello - 05.09.2017, 00:50
Re: Error with MYSQL and Toys - by Luke_James - 05.09.2017, 01:01
Re: Error with MYSQL and Toys - by Jefff - 05.09.2017, 01:05
Respuesta: Error with MYSQL and Toys - by Dello - 05.09.2017, 01:12
Respuesta: Re: Error with MYSQL and Toys - by Dello - 05.09.2017, 01:15
Re: Error with MYSQL and Toys - by Luke_James - 05.09.2017, 01:17

Forum Jump:


Users browsing this thread: 1 Guest(s)