Jump to content

Could you please give me an idea for an SQL ban system?


TrickyTommy

Recommended Posts

Hi. I made a table for player bans, right now it has 2 rows, one of it is the player's serial, and the other one is the reason. But the problem is, i can only make a system for permanent bans.

I was wondering, how should i make a temporary one, and this is what i have come up so far:

The player who banns should write the date until the ban is up like this:
YYYYMMDDHHMM (all in together, it would look like this: 199903160010
So if the admin would like to ban him for a day, (199903170010) and if it passes by, the system checks the current date with the exact same format, and if the current date is bigger or equal to the date of expiry, it would let him pass the account system. Else it would say that the account is banned.

This is my idea, but it might be complicated for admins to obey the format. Do you have a better one? If so, please let me know.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...