Hello all I want to keep track of the ‘last 15' times a user has visited my site. I have created a table with the following fields: count username timestamp I have set count to autoincriment, but it obviously counts every user so that an individual user won’t have 1,2,3, but could have 1,6,19 etc. After they have had their last 15 visits counted I want the oldest one to be deleted so that there is only ever 15 records for any individual user at any one time. Any ideas on how to do this? Many thanks in advance
I suggest u to do this, create a table with the following fields, vid,username,time with vid auto inc when ever some one log in , an insert query , saves that into ur table.. when u want to review the last 15 visits of a specific user, simply do query: SELECT * FROM ur_table WHERE username='user' order by vid desc limit 15 and of course then u fetch that query and u printout the time regards, any help am ready
Thanks very much Mohie I'm going to give it a try and I'll get back to you to let you know if it was successful Cheers