MySQL Problems
#8

Quote:
Originally Posted by xVIP3Rx
View Post
I believe you are messing a " ' ", colored red in the line.
Code:
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s','%s','0')",GetPlayerName(playerid),EscapedText);
Also looks like your query isn't formatted properly, as it's giving blank values instead of a password/name

If you would post the whole function or callback I believe I will be able to help.
Thanks for the reply, seems I and others overlooked this little late night amatuer mistake.

Code:
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s', '%s', '0')",GetPlayerName(playerid),EscapedText);
Should be:

Code:
GetPlayerName(playerid, PlayerNameSQL, sizeof(PlayerNameSQL));
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s', '%s', '0')",PlayerNameSQL,EscapedText);
Works as desired now, thanks to all that gave me some tips.
Reply


Messages In This Thread
MySQL Problems - by kiloman3 - 14.09.2015, 06:03
Respuesta: MySQL Problems - by Zume - 14.09.2015, 07:13
Re: Respuesta: MySQL Problems - by kiloman3 - 14.09.2015, 09:54
Re: MySQL Problems - by nezo2001 - 14.09.2015, 10:19
Re: MySQL Problems - by kiloman3 - 14.09.2015, 11:53
Re: MySQL Problems - by kiloman3 - 15.09.2015, 09:37
Re: MySQL Problems - by xVIP3Rx - 15.09.2015, 10:34
Re: MySQL Problems - by kiloman3 - 17.09.2015, 01:10

Forum Jump:


Users browsing this thread: 3 Guest(s)