CMySQLHandler::Query(яяяя) - An error has occured. (Error ID: 1064, 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 'яяяя' at line 1)
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s','%s,'0')",GetPlayerName(playerid),EscapedText);
ShowPlayerDialog(playerid,1336,DIALOG_STYLE_INPUT,"Register - Enter your password","You are about to register a new account! \nPlease choose the password for it! \n","Register!","");
mysql_real_escape_string(inputtext, EscapedText);
printf("[MySql] %s", Query);
PHP Code:
|
[21:54:21] [MySql] ”SERT INTO `Users` (Username,Password,Money) VALUES ('',','0')
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s','%s','0')",GetPlayerName(playerid),EscapedText);
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); If you would post the whole function or callback I believe I will be able to help. |
format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s', '%s', '0')",GetPlayerName(playerid),EscapedText);
GetPlayerName(playerid, PlayerNameSQL, sizeof(PlayerNameSQL)); format(Query,sizeof(Query),"INSERT INTO `Users` (Username,Password,Money) VALUES ('%s', '%s', '0')",PlayerNameSQL,EscapedText);