12.11.2010, 21:19
Your problem would consist at trying to insert "%d/%d/%d" - MySQL syntax is different from file functions.
Firstly, make sure that the Date and Time options are strings, then do something like the following:
Better yet, you could use the default time and date functions included in MySQL - look them up.
Firstly, make sure that the Date and Time options are strings, then do something like the following:
pawn Код:
format(string, 20, "%d/%d/%d", month, day, year);
format(string2, 20, "%d:%d:%d", hour, minute, second);
format(Query, sizeof(Query), "INSERT INTO `Admin Logs` (`AdminName`, `PlayerName`, `Action`, `Reason`, `Date`, `Time`) VALUES('%s', '%s', '%s', '%s', '%s', '%s')", adminname, playername, action, reason, string, string2);