what if you have something like 1000 users on your system. you'd have 1000 txt files! :( the DB seems to be a better idea as it's probably more expandable... you can do other queries to it and stuff... whereas 1000 txt files will be a pain in the butt to keep track of. On 4/19/05, Ryan A <ryan@xxxxxxxxxxxx> wrote: > Hey, > > > As to exactly how you decide which are the most recent 10 records to do > > > > this deletion, that is a little more complex. > > Yep, for sure > > > > Something like > > > > DELETE FROM profile_visits > > > > WHERE user='billy' > > > > AND time_of_visit NOT IN ( > > > > Select time_of_visit > > > > FROM > > > > profile_visits > > > > WHERE user='billy' > > > > ORDER by time_of_visit DESC LIMIT 10 > > > > ) > > > > > > > > Should give you an idea. > > Yep, gets me thinking in a few other directions... > > I am also toying with the idea of having a txt file for each profile > (instead of using the DB) and fetch/record/delete/update the last 10 > there... what do you think? easier? > > Thanks, > Ryan > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.9.16 - Release Date: 4/18/2005 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php