Jump to content

Is there a way to detect SQL Data Changes?


FlyingSpoon

Recommended Posts

Posted

Say if I made an external site and I update something via PHP to the database, (e.g. UPDATE users SET rank=? WHERE username=?, 4, Light); And in-game is there a way to detect this change has been made? Like, it detects the change and outputs, "[Web] You rank has been updated". I know I can do this using setTimer, but I don't want it to be an endless loop, I just want it to be so that if a SQL Data has changed or been updated, it will detect it.

  • Moderators
Posted (edited)

Afaik mysql does have such things as events:

https://dev.mysql.com/doc/refman/5.7/en/events-privileges.html

(never used it thought)

I am not sure what the possibilities with this are, but it can do a part of the administration for you.

 

Edited by IIYAMA

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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...