Data lose
#1

I've made a command to ban players and insert their data of ban to another table seprated from the users one
PHP код:
    new Day, Month, Year;
    
getdate(Year,Month,Day);
    new 
TwBiNDb[128]; //Time will be inserted in Database
    
format(TwBiNDb, sizeof(TwBiNDb), "%i/%i/%i", Day, Month, Year);
    
format(string, sizeof(string), "INSERT INTO bans (PlayerBanned, BannedBy, reason, ip, time, unban, BanType) VALUES ('%s', '%s', '%s', '%s', '%s', '%i', '1')",PlayerName(targetid), PlayerName(playerid), reason, PlayerIP(targetid), TwBiNDb, unban);
    
mysql_query(1, string);
    
mysql_log(LOG_ALL);
    new 
message[200];
    
format(message, sizeof(message), "%s has temporary banned by %s for %i day(s). Reason [%s]",PlayerName(targetid), PlayerName(playerid), time, reason);
    
SendClientMessageToAll(COLOR_RED, message);
    
SetTimerEx("ban", 500, false, "i", targetid);
    
printf("[MySql]    %s", string); 
But when I got banned all the data of my account in the users table got removed except the date of register?!
Reply
#2

Can you show us your "Ban" public?

The one from this line:
pawn Код:
SetTimerEx("ban", 500, false, "i", targetid);
Reply
#3

PHP код:
Kick(playerid); 
Reply
#4

Bump!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)