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
2010-06-01 05:37:05
how do I do it?? do you have any sample??
mathew
2010-06-01 05:49:02
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
2010-06-01 05:50:55
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
2010-06-01 06:42:21
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
2010-06-01 07:18:15