if(dialogid == DReg)
{
if(response == 1)
{
new
str[128],
password[50];
format(str, 128, "SELECT * FROM `playerinfo` WHERE `user` = '%s'", pName(playerid));
mysql_query(str);
mysql_store_result();
if(mysql_num_rows() == 1)
{
SendClientMessage(playerid, RED, "ERROR: This account is already registered!");
ShowPlayerDialog(playerid, DLogin, DIALOG_STYLE_INPUT, "RC:RP Login", "Please enter your password below to login", "Login", "Cancel");
mysql_free_result();
return 1;
}
mysql_free_result();
CMySQL_Create(str, ACCOUNT_TABLE, "User");
CMySQL_Password(str, ACCOUNT_TABLE, "Password", inputtext);
CMySQL_SetInt(str, ACCOUNT_TABLE, "User", "Money", 5000);
}
else
{
SendClientMessage(playerid, GREEN, "You have cancelled registration, you have been kicked");
Kick(playerid);
}
}
[12:59:22] [join] Toni_Tang has joined the server (0:192.168.1.75) [12:59:27] MySQL Error (0): Could not execute query. 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 'SELECT * FROM `playerinfo` WHERE `user` = \'Toni_Tang\' = ''' at line 1. |
SELECT * FROM `playerinf |
format(str, 128, "SELECT * FROM `playerinfo` WHERE `user` = '%s'", pName(playerid));
mysql_query(str);
mysql_store_result();
new Query[200], Pname[24]; //Creates the Query string and the Pname
GetPlayerName(playerid, Pname, 24); //Gets the players name
format(Query, sizeof(Query), "SELECT * FROM `playerinfo` WHERE `user` = '%s'", Pname); //Selects the line where the playername is the player
mysql_query(Query); //Querys the string
mysql_store_result(); //Stores the result
mysql_real_escape_string(pName(playerid), str);
format(str, 128, "SELECT * FROM `playerinfo` WHERE `user` = '%s'", str);
mysql_query(str);
mysql_store_result();
It looks right to me, but just incase
pawn Код:
|
ffs lol just use the reg system i gave you why do u even need to change it
|