14.12.2013, 02:45
Am I the only one encountering the problem where the '%e' prefix in format does not work (escapes incorrectly)?
Another question, what's the " | d" at the end of the first line below?
(Escaping using mysql_real_escape_string function and the '%s' works just as fine)
Logs:
Code:
Another question, what's the " | d" at the end of the first line below?
(Escaping using mysql_real_escape_string function and the '%s' works just as fine)
Logs:
Код:
Passing query SELECT `test` FROM `table` WHERE `name` = 'e' LIMIT 0,1 | d ProcessQueryThread(OnAPublic) - Query was successful. (SELECT `test` FROM `table` WHERE `name` = 'e' LIMIT 0,1)
pawn Код:
new query[64];
format(query, sizeof(query), "SELECT `test` FROM `table` WHERE `name` = '%e' LIMIT 0,1", GetName(playerid));
mysql_function_query(Handler, query, true, "OnAPublic", "d", playerid);
forward OnAPublic(playerid);
public OnAPublic(playerid)
{
// ......
return 1;
}
GePlayerName(playerid)
{
new name[MAX_PLAYER_NAME]
GetPlayerName(playerid, name, sizeof(name));
return name;
}