SA-MP Forums Archive
Mysql error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mysql error (/showthread.php?tid=498252)



Mysql error - RealHobo009 - 02.03.2014

Hey I have this piece of code:

pawn Код:
new hashpass[129];
                WP_Hash(hashpass,sizeof(hashpass),inputtext);
                format(Query, sizeof(Query), "INSERT INTO `usuarios` (Nombre, Contraseсa) VALUES ('%s', '%s')",pName, hashpass);
                mysql_function_query(Conecction, Query, true, "OnQueryFinish", "ii", 0, playerid);
And i get this error message:

Код:
[12:26:13] [ERROR] ID: 1064 - Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '±a) VALUES ('stuntman', '668397D122439D9C9C7B0155BC7C8D2D5C2A8895724B00CEFA66E6' at line 1 - Callback - OnQueryFinish - Query: INSERT INTO `usuarios` (Nombre, ContraseГ±a) VALUES ('stuntman', '668397D122439D9C9C7B0155BC7C8D2D5C2A8895724B00CEFA66E6EE3E611E62F0B8969F7F8B0953867D85A2A54DDBA98A836AF642B7B921C6EB641C2933E5A9')
Thanks!


Re: Mysql error - Konstantinos - 02.03.2014

"с" character is not valid.


Re: Mysql error - RealHobo009 - 02.03.2014

Fixed, wrong variables.

EDIT: Konstantinos yes that was a problem, I switched the variables and solved! Thanks anyway!