FlyingSpoon Posted February 22, 2018 Share Posted February 22, 2018 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. Link to comment
NeXuS™ Posted February 22, 2018 Share Posted February 22, 2018 You can create a call in the PHP file to the MTA server. Link to comment
ShayF2 Posted February 23, 2018 Share Posted February 23, 2018 Best way is to run a timer on server side checking the data in the sql, since the sql connection stays constant. Link to comment
Moderators IIYAMA Posted February 23, 2018 Moderators Share Posted February 23, 2018 (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 February 23, 2018 by IIYAMA Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now