Mysql on change

Discussion in 'Spigot Plugin Development' started by gamer4always, Jun 15, 2016.

  1. Hello,

    I where wondering if it's possible without looping to check for sql changes.
    Like status 0 changed to status 1 in database and the jar picks it up and does what It needs to do.

    I thought it where possible. I heard somewhere about it.

    Can you guys help me out? Much thanks already!
     
  2. MiniDigger

    Supporter

    SQL is not capable of that. It's query driven and not event driven.
    I am sure that there are some hacky solutions, but you should reiterate on your design process I guess. If you tell us what you are trying to do we could try to help you to find a better solution.
     
  3. I use Jedis for this sort of stuff when working cross servers although if you're just wanting to run some code once the query has finished, you could just use a callback
     
    • Agree Agree x 1
  4. I have made a program that is when i click on whitelist on setting record Whitelist to 1 in the sql.

    and than it will start kicking people and turn whitelist on.