new avardas[25];
GetPlayerName(playerid, avardas, 25);
new s[256];
format(s, sizeof(s), "[BAN] {B36666}%s {3EFFFF}uzblokavo {B36666}%s {3EFFFF}( %s )", avardas, vardas, prz);
SendClientMessageToAll(COLOR_CYAN, s); // everything till here went fine
new query[500];
mysql_format(1, query, sizeof(query), "UPDATE akauntai SET banned='1',przban='%s',banner='%e' WHERE vardas = '%e'", prz, avardas, vardas); // in mysql log I do see, that query is formatted successfully.
mysql_query(1,query); // but i don't see query executed successfully, only about formatting and deconstructor called.
new que[500];
mysql_format(1, que, sizeof(que), "INSERT INTO kickai (admin_name, kicked_name, prz, data, expiration, tipas) VALUES ('%e','%e','%s',NOW(),UNIX_TIMESTAMP()+2592000), '1'", avardas, vardas, prz);
mysql_query(1,que); // the same here
SetTimerEx("KickTimer", 100, false, "i", i); // further everything again works fine
break;
Well I am also facing the same problem right now. Are you sure the connection handle is 1?
|
new SQL = mysql_connect(blablabla);
I am new to MySQL. Are you sure it worked everytime when you use 1?
pawn Код:
|
That will happen when said query has something wrong with it, so you'd better investigate your query.
You're using the %e (floating-point scientific notation) specifier when I'm pretty sure you should be using %s. Also make sure you're inserting all the necessary initial columns on INSERT. |
Declare it as a global variable. I mean on top of your script.
|