I don't see what I'm doing wrong...
#2

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:
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);
Better yet, you could use the default time and date functions included in MySQL - look them up.
Reply


Messages In This Thread
I don't see what I'm doing wrong... - by Scenario - 12.11.2010, 21:04
Re: I don't see what I'm doing wrong... - by Grim_ - 12.11.2010, 21:19
Re: I don't see what I'm doing wrong... - by Scenario - 12.11.2010, 21:48

Forum Jump:


Users browsing this thread: 1 Guest(s)