How do I show number of fetching of a data in a MySQL data base?
I would like to show to user how many time a data has been accessed. I am us开发者_运维问答ing MySQL and PHP.
You would have to implement this yourself as some counter value that you increment whenever you run a query on that data.
In short and simple:
select * from mytable where ID=$field_id;
update mytable set count_field=count_field+1 where ID=$field_id;
I hope you get the point
make a function increaseVisits($userId) where you update the numberVisits of the user and let this function run everytime he logs in to the system.
精彩评论