22.07.2014, 10:20
Hello users,
I've been creating my own personal project and trying crazy things on it. However, I'm unsure of the best live migration between the MySQL server and the SA-MP server. So at the moment my server grabs the data from MySQL table and stores it on the server and only updates the users table whenever the user logs out. It never refreshes the table to grab any changed data from the MySQL server. In order to make a live migration between the MySQL and server requires the data to be saved onto the MySQL server often, so therefore I was thinking of updating the field each time you modify ANY sort of data, for example if a player was to give money, it will automatically update the MySQL field as soon as the command is executed. So it's easy to update the data, however what if I renewed the data in the MySQL (from Navicat or Phpmyadmin)? The data won't be imported into the server. What would be the best way to migrate the two? I mean SELECTing from the Database each time would be a hassle. This is basically for the UCp that I'm planning on creating in the future which allows me to edit data and not just view it. I can obviously edit the data if the player is not logged in, however I want it so I can edit it whilst they're logged in aswell.
I've been creating my own personal project and trying crazy things on it. However, I'm unsure of the best live migration between the MySQL server and the SA-MP server. So at the moment my server grabs the data from MySQL table and stores it on the server and only updates the users table whenever the user logs out. It never refreshes the table to grab any changed data from the MySQL server. In order to make a live migration between the MySQL and server requires the data to be saved onto the MySQL server often, so therefore I was thinking of updating the field each time you modify ANY sort of data, for example if a player was to give money, it will automatically update the MySQL field as soon as the command is executed. So it's easy to update the data, however what if I renewed the data in the MySQL (from Navicat or Phpmyadmin)? The data won't be imported into the server. What would be the best way to migrate the two? I mean SELECTing from the Database each time would be a hassle. This is basically for the UCp that I'm planning on creating in the future which allows me to edit data and not just view it. I can obviously edit the data if the player is not logged in, however I want it so I can edit it whilst they're logged in aswell.