08.01.2015, 10:04
look at this : http://dev.mysql.com/doc/refman/5.1/...unix-timestamp
pawn Код:
format(Query, sizeof(Query), "SELECT UNIX_TIMESTAMP(LastLogin) FROM `Users` WHERE `Username` = '%s' LIMIT 0, 1", DB_Escape(hInfo[h][Owner]));
Result = db_query(Database, Query);
if(db_num_rows(Result))
{
db_get_field_assoc(Result, "LastLogin", Date, 32);
if(gettime() - strval(Date) >= 5259486) // 60 days = 5259486 secconds
{
hInfo[h][IsOwnerInactive] = 1;
LoadedInactiveHouses++;
}
}
db_free_result(Result);