SA-MP Forums Archive
MySQL insert into problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: MySQL insert into problem (/showthread.php?tid=221329)



MySQL insert into problem - [MWR]Blood - 05.02.2011

Okay, I've got this:
pawn Код:
new PIP[56];
GetPlayerIp(id,PIP,56);
new Admin[MAX_PLAYER_NAME];
new User[MAX_PLAYER_NAME];
new hour,minute,second,date,month,year;
gettime(hour,minute,second);
getdate(date,month,year);
format(Query, sizeof(Query), "INSERT INTO `Bans` (`User`, `IP`, `Reason`, `Admin`, `Ban Time`, `Unban Time`) VALUES('%s', '%s', '%s', '%s', '%d/%d/%d', '%d:%d:%d:%d')", User,PIP,reason,Admin,date,month,year,days,hours,minutes,seconds);
mysql_query(Query);
mysql_store_result();
It inserts it, but the correct things are only the ban reason, and the time.
Others are just left blank.
I just can't figure out what I'm doing wrong... help me please, thanks in advance!