0

I have a database in which some tables are updated every 2 minutes (using UPDATE, old rows are kept). I also have a page to show the latest data from these tables.

To the problem: Sometimes the page shows only a part of the current rows since they are being updated in that exact moment (I am talking about ~15sec, so it is likely a user will experience this "fake" data sometimes which I want to prevent)

My idea is to set a value to 1 in another database before all the UPDATE stuff happens and set it back to 0 when done. On the display page I would check whether value is 0 or 1 and an error page would be displayed if the data is not complete. The problem is the update script sets the value to 1 but immediately sets it back to 0. I tried using mysqli_unbuffered_query() for the update queries, but that didn't change anything, instead it made the script stop after some rows.

Do you have an idea on how I could solve this? Thanks in advance.

Henry
  • 15
  • 1
  • 8

0 Answers0