13.05.2013, 11:15
(
Last edited by CrossUSAAF; 13/05/2013 at 03:56 PM.
)
Problem already solved!
public CheckAccount(playerid, account[])
{
new rows, fields;
cache_get_data(rows, fields);
if(rows)
{
SetPVarInt(playerid, "IsRegistered", 1); // Then we set PVar for players that are registered already
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD...);
}
return 1;
}
Try this:
pawn Code:
|
Thank you really much Vince and Calabresi. I Didn't know that you can just use "rows", but thank you for that information! Now the login dialog seems to work correctly.
Then this, what I'm wondering: When using "mysql_real_escape", is it same as "%e", escaped string? |
new query[64], pName[MAX_PLAYER_NAME], escname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
mysql_real_escape_string(pName, escname);
format(query, sizeof(query), "UPDATE Name='Testing' WHERE Name='%s'", escname);
mysql_function_query(cHandle, query, false, "OnQueryFinish", "i", playerid);
new query[64], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
mysql_format(cHandle, query, "UPDATE Name='Testing' WHERE Name='%e'", pName); // '%e' automatically escapes the string.
mysql_function_query(cHandle, query, false, "OnQueryFinish", "i", playerid);