tags:

views:

44

answers:

3

I would like to show to user how many time a data has been accessed. I am using MySQL and PHP.

+5  A: 

You would have to implement this yourself as some counter value that you increment whenever you run a query on that data.

webdestroya
how do I do it?? do you have any sample??
mathew
It will take more than a comment box to explain it, perhaps you should take a look at how you can use a database in PHP.
webdestroya
A: 

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

Riho
A: 

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.

Robijntje007