1

My plan is to store data in my local MySQL database and after a time interval it will update my live MySQL database remotely. Is it possible?

I'm planing a inventory management script in PHP MySQL. The real problem is in our country net connection drops suddenly. So I want to first write to the local MySQL database and then it will update the real server. In any situation like internet connection dropped the script will work locally to gather data and retrieve data. When the internet connection comes ba

Himmat rai
  • 57
  • 1
  • 6
  • Of course it's possible but that is far too broad a question for this site. You need to decide on a strategy and attempt an implementation and then post back if and when you encounter an actual issue. – jmcilhinney Feb 16 '20 at 06:24
  • You would need to record the datetime at which the data was stored so that you could determine if it is newer than the data in the live database. You might need to use a [transaction](https://dev.mysql.com/doc/refman/8.0/en/commit.html) for the update. – Andrew Morton Feb 16 '20 at 08:31

0 Answers0