How to create mysql log
#2

You will need to edit this of course, to match your database.

pawn Код:
stock AdminLog(adminname[], playername[], action[], reason[])
{
    new hour, minute, second, year, month, day;
    getdate(year, month, day);
    gettime(hour, minute, second);

    format(Query, sizeof(Query), "INSERT INTO `Admin Logs` (`AdminName`, `PlayerName`, `Action`, `Reason`, `Date`, `Time`) VALUES('%s', '%s', '%s', '%s', '%d/%d/%d', '%d:%d:%d')", adminname, playername, action, reason, month, day, year, hour, minute, second);
    mysql_query(Query);
}
Reply


Messages In This Thread
How to create mysql log - by NewbBeginner - 15.11.2010, 11:32
Re: How to create mysql log - by Scenario - 15.11.2010, 12:33
Re: How to create mysql log - by NewbBeginner - 15.11.2010, 12:41
Re: How to create mysql log - by Scenario - 15.11.2010, 12:45

Forum Jump:


Users browsing this thread: 1 Guest(s)