简体   繁体   English

我如何仅显示历史记录页面中的更新记录

[英]how can i show only updated records in history page

I have a table user. 我有一个表用户。 In user table there may be many users like XYZ,ABC etc. 在用户表中,可能有很多用户,例如XYZ,ABC等。

and columns of user are id,name,age,phoneno,emailid,address. 用户的列是ID,名称,年龄,电话号码,电子邮件地址,地址。

Now I have three pages login.php,profile.php and history.php. 现在,我有三个页面login.php,profile.php和history.php。

Now when user XYZ login in his account (User XYZ has his id and password) . 现在,当用户XYZ登录其帐户时(用户XYZ具有其ID和密码) Then in profile page there are some editable text fields like name,age,phone number,emailid (Email id is unique not editable) and address. 然后在个人资料页面中,有一些可编辑的文本字段,例如姓名,年龄,电话号码, 电子邮件ID(电子邮件ID是唯一的不可编辑)和地址。

Now user XYZ changes his phone number and address. 现在,用户XYZ更改了他的电话号码和地址。 Then only updated phone number and address must be shown in history page of user XYZ (like User XYZ changed his phone number 123456... and address abcdefgh..) . 然后,仅更新后的电话号码和地址必须显示在用户XYZ的历史记录页面中(例如,用户XYZ更改了他的电话号码123456 ...和地址abcdefgh ..)

How it can be possible. 怎么可能。 Please help as soon as possible. 请尽快提供帮助。

I think you are talking about audit log or audit trail. 我认为您是在谈论审核日志或审核跟踪。 There are many ways to do it depending on your preference. 有多种方法可以执行此操作,具体取决于您的偏好。

What I've encounter is to put status on the table, date updated and who updated the data. 我遇到的是在表格上显示状态,更新日期以及谁更新了数据。

Then I need to compare the previous record and new record and find which field changes. 然后,我需要比较先前的记录和新的记录,并找出哪个字段发生了变化。

The other way is you have a table that will store the field changes. 另一种方法是您有一个表,用于存储字段更改。 Everytime there is a change on you table you will save the action on the table, field changed, date changed and who did the changes. 每当您的表发生更改时,您都将在表上保存操作,更改字段,更改日期以及更改的人。

Hope this helps. 希望这可以帮助。

Thanks. 谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何获得指向重定向页面的链接以显示在浏览器的历史记录中? - How can I get links to a redirect page to show up in the browser's history? 如何从经典ASP的历史记录中获取上一页? - How can I get the previous page from history in classic ASP? 如何在页面加载时转到history.back()? - How can I go to history.back() when page loads? 如何使用localStorage存储用户的页面历史记录? - How Can I Store User's Page History Using localStorage? 如何仅在React页面中显示pdf第一页的屏幕截图? - How can I only show a screenshot of the first page of a pdf in a React page? 如何加载标题,更改标题,然后重定向到包含更新标题的页面? - How can I load a header, change it, then redirect to a page with the updated header? 如何仅在首次访问时显示页面加载时带有slimbox的弹出窗口? - How can I show popup with slimbox on page load only for the first visit? 当用户滚动到页面顶部时,如何才能使此代码仅显示div标签? - How can I go about making this code only show the div tag when the user scrolls to the top of the page? 如何仅显示来自不同页面的ID的HTML div或td元素? - How can I show only HTML div or td elements ID'ed from a different page? 如何仅显示ID等于与给定页面关联的特定ID的评论? - How can I show only comments with id equal to a certain id associated with a given page?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM