ban command problem
#7

If you use (CTS+gettime()) to insert on `Days` you'll get:

(The current timestamp + (Amount of days in seconds)) + The Current timestamp; because you already had defined CTS as the current timestamp + amount of days in seconds. This will always return a negative integer as it will surprass the max integer limit and will return weird data. (Current timestamp is 1.39B~).

pawn Код:
format(Query, sizeof(Query), "INSERT INTO `Bans` (Username, Admin, IP, Reason, Days, Banned, Time) VALUES ('%s', '%s', '%s', '%s', '%d', 1, '%s')", pName, aName, IP, Reason, CTS, InsertTimeStamp());
    mysql_function_query(mysqlc, Query, false, "", "");
Should do.

Also you can use the indicator NOW() on the SQL query to insert current date and time without having to process it anywhere before.
Reply


Messages In This Thread
ban command problem - by Face9000 - 05.02.2014, 10:15
Re: ban command problem - by Konstantinos - 05.02.2014, 10:28
Re: ban command problem - by Face9000 - 05.02.2014, 10:32
Re: ban command problem - by RajatPawar - 05.02.2014, 10:36
Re: ban command problem - by Konstantinos - 05.02.2014, 10:39
Re: ban command problem - by Face9000 - 05.02.2014, 10:48
Re: ban command problem - by CuervO - 05.02.2014, 11:32
Re: ban command problem - by Face9000 - 05.02.2014, 18:04

Forum Jump:


Users browsing this thread: 2 Guest(s)