Hi, I am trying to create an HTML table full of historical data of user accounts, but I only want to display the data that has changed. I am having issues, because the current data of the user accounts is stored in a different SQL table than the historical data, and the attributes that I would like to match up appear in a JSON string in the database with the historical data. Is there a clean, efficient way to go about checking if the data for each of the categories has changed, for each of the changes to the user account?
For clarification’s sake:
Here is the SQL I am fetching the current state of the user accounts from:
SELECT * FROM userAccounts
And the historical data:
SELECT * FROM historicalAccounts where id='$row["id"]'
This works as intended, however the second table does not have the same rows as the first, instead it has a row called JSON that contains the majority of the attributes of each user. I am able to create a table that contains the information I want, however I am looking for a snippet of PHP code that will allow me to only display the attributes that were changed from each of the past updates of the information. Thanks!