Insert query not working
#1

Error:
pawn Код:
[09:43:03]  ErrorID: 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 ' VALUES('Mersey', '758DA252C75574FB9AC02057BBA14DBFBCADBE0E4DD9A1E039A71DFDC4AF7' at line 1 | Query: INSERT INTO `accounts` (name, password), VALUES('Mersey', '758DA252C75574FB9AC02057BBA14DBFBCADBE0E4DD9A1E039A71DFDC4AF7957F015654D6049F063F6C670736AB064E709866CEB2CDC45833DBE99C3F42C996B')
Code:
pawn Код:
new
    hashedPassword[255],
    string[450];
                       
WP_Hash(hashedPassword, sizeof hashedPassword, inputtext);
                       
mysql_format(mysqlHandle, string, sizeof string, "INSERT INTO `accounts` (`name`, `password`), VALUES('%e', '%e')", PlayerName(playerid), hashedPassword);
mysql_function_query(mysqlHandle, string, false, "", "");
Reply
#2

bump
Reply
#3

pawn Код:
new
    hashedPassword[129],
    string[450];
                       
WP_Hash(hashedPassword, sizeof hashedPassword, inputtext);
                       
mysql_format(mysqlHandle, string, sizeof string, "INSERT INTO `accounts` (`name`, `password`) VALUES('%e', '%e')", PlayerName(playerid), hashedPassword);
mysql_function_query(mysqlHandle, string, false, "", "");
Reply
#4

Nevermind, fixed it.
Edit:
Quote:
Originally Posted by biker122
Посмотреть сообщение
pawn Код:
new
    hashedPassword[129],
    string[450];
                       
WP_Hash(hashedPassword, sizeof hashedPassword, inputtext);
                       
mysql_format(mysqlHandle, string, sizeof string, "INSERT INTO `accounts` (`name`, `password`) VALUES('%e', '%e')", PlayerName(playerid), hashedPassword);
mysql_function_query(mysqlHandle, string, false, "", "");
Thank you anyways
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)