MySQL query passing problem.
#1

Why the correct values (for example PaskutinisIsemimas - 2012-05-11 01:54:23) not being shown, but %e instead? And because of that the row I want to update is not being updated.

pawn Код:
mysql_format(Handle, saveData, "UPDATE `zaidejai` SET `SukurimoData` = '%e', `PaskutinisIsemimas` = '%e', `IsvisoPadeta` = '%d', `LygioTaskai` = '%d' WHERE `Vardas` = '%e'", pInfo[playerid][statsRegistrationDate], pInfo[playerid][statsLastWithdrawDate], pInfo[playerid][statsTotalMoneyInBank], pInfo[playerid][statsLevelPoints], GetPlayerNameEx(playerid));
    mysql_function_query(Handle, saveData, false, "", "");
Quote:

[01:51:17] ProcessQueryThread() - Query was successful. (UPDATE `zaidejai` SET `SukurimoData` = '%e', `PaskutinisIsemimas` = '%e', `IsvisoPadeta` = '0', `LygioTaskai` = '110' WHERE `Vardas` = '%e')
[01:51:17] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()

In other queries, its okay. (code is totally the same)

Quote:
Quote:

[01:51:17] ProcessQueryThread() - Query was successful. (UPDATE `zaidejai` SET `Slaptazodis` = 'x', `Email` = 'dafuqtest@inbox.lt' <...>

Reply
#2

I'm not aware of the bug with mysql_format being fixed. You should stick with normal format and mysql_real_escape_string.
Reply
#3

Dayumn, so lazy to convert mysql_format to normal format function ;\ Going to try ****** code version one.
Reply
#4

Looks like even the ****** code plugin version developers are using format :>

Will this function

pawn Код:
function mysql_real_escape_stringex(str[])
{
    new escapedString[64];
    mysql_real_escape_string(str, escapedString);
    return escapedString;
}
work, when it'll be used something like

pawn Код:
mysql_real_escape_stringex(player_name)
?
Reply
#5

Up. xd
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)