MySQL Question

Discussion in 'Plugin Development' started by L33m4n123, Sep 14, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    L33m4n123

    Hey guys,

    I am currently writing a whole new Warning/Tempban/Permban system for my Server since the once I found so far and tested so far were not what I wanted. So anyways let's get to my question.

    I store the Playername, the Ammount of Warnings and the Time of the last warning in a MySQL database (since I want to use it for more and write a GUI on my website for my Moderators to use etc.) So. Is there any easy way within MySQL / Java to compare the

    timestamp (MySQL. Automaticly assigned when the entry gets created/altered)

    and the current date? Because what I want is that after a certain set of time (like 48h) the warning Decays. So I would need to see when Plaxer X got the last time a warning to erase his warning points.

    If anyone has a solution for it I am happy. Don't even need the complete code. A hint in the right direction is for the start ok too ;)

    Thanks in advance

    Edit: UUps. Thought I posted it in Plugin Development. My bad :/
     
  2. Offline

    Necrodoom

    Moved to correct section.
     
  3. Offline

    EdenCampo

    L33m4n123

    You wanna compare the timestamps when the banned player joins the server?
    Like...

    I'm banned for one day, trying to enter your server plugin starts a check:

    1. Query ban length
    2. Check current time
    3. Unban(yes:no)
     
Thread Status:
Not open for further replies.

Share This Page