Maintain User History

hi all,

i m bit confuse in maintenance of user action history. i m developing a document management system and if a user visit a document page the system need to save it as we are showing it in last viewed documents.

How could i maintain it, i need to store last 10 viewed documents history. if i maintain a separate table for it then when i’ll delete other records, the older then recent 10.

Do you need to save anything? :)

A simple query will give you the last 10 created/edited by a user.

That’s why you are using a database.

Just use limit 10, and that’s it.