0

I have Mobile App which updates MYSQL database. There are multiple users using this app. Our goal is to track changes made by these users and display it on a webpage.

I want to make a webpage in php where I can see stats.

So my question is how to detect changes in database (which are made through App) and display the 'Stats' of it on Webpage with the help of php?

Thanks

  • I guess it's not for the full database might be only a single table right? If so then you can check the database structure for `wordpress` & there implementation. – ARIF MAHMUD RANA May 15 '16 at 11:52
  • 1
    You need some form of trigger mechanism, either on database level (inside MySQL, take a look at the `TRIGGER` feature it offers) or on application level (inside php). For each modification a "change object" is created (for example in a specific "changes" table) in addition to actually storing the modification. That is the information you are looking for. All that is left is to display the changes collected in that table. – arkascha May 15 '16 at 11:53
  • @arkascha that was helpful –  May 15 '16 at 13:22
  • [Long polling](http://stackoverflow.com/a/333884/1127972) or [Server Sent Events](https://en.wikipedia.org/wiki/Server-sent_events) are the simple way to efficiently implement instant notification in a client. – doug65536 May 15 '16 at 18:16

0 Answers0