Problem with mysql + ban system. -
iryston - 08.11.2013
I'm trying to make a temporary ban system on my gm
The problem is that the function INSERT INTO not inserting the correct value. Are entering "49"
Code:
pawn Код:
new Str[398] tmp3[25];
format(tmp3, 25,"%i",gettime());
print(tmp3); //Just to check .. printed 1383943912
format(Str, 148, "INSERT INTO `banlist`(`IP`, `Nome`, `Nick`, `Admin`, `Motivo`, `TempoBan`, `DataBan`, `HoraBan`, `TempoUnban`, `Pic1`, `Pic2`, `Pic3`, `Detalhes`)");
format(Str, 398, "%s VALUES ('%s','%s','%s','%s','%s','%i','%s','%s','%i','---','---','---','In-Game')", Str, ip, PlayerName(playerid),PlayerName(playerid), string2, string, string3, tmp, tmp2, tmp3);
mysql_function_query(Connect, Str, false, "", "");
Result:
pawn Код:
INSERT INTO `banlist`(`IP`, `Nome`, `Nick`, `Admin`, `Motivo`, `TempoBan`, `DataBan`, `HoraBan`, `TempoUnban`, `Pic1`, `Pic2`, `Pic3`, `Detalhes`) VALUES ('127.0.0.1','ViNi_TensO','ViNi_TensO','ViNi_TensO','asdf','2','8/11/2013','18:51:52','49','---','---','---','In-Game')
Was to enter "1383943912" and not 49, I've tried several ways most do not find the solution please help me !
Re: Problem with mysql + ban system. -
MyLife - 08.11.2013
replace tmp3 with
Код:
new tmp3 = gettime();
Re: Problem with mysql + ban system. -
-Prodigy- - 08.11.2013
pawn Код:
format(Str, 398, "%s VALUES ('%s','%s','%s','%s','%s','%i','%s','%s','%s','---','---','---','In-Game')", Str, ip, PlayerName(playerid),PlayerName(playerid), string2, string, string3, tmp, tmp2, tmp3);
Re: Problem with mysql + ban system. -
iryston - 08.11.2013
There are certain things in life we can not understand.
This is one!
Thank you! Very Thanks
++REP! MyLife
EDIT: -Prodigy- Thanks also. code of MyLife already solved