Re: Last visitors

From: Date: Tue, 19 Apr 2005 13:25:20 +0000
Subject: Re: Last visitors
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-213355@lists.php.net to get a copy of this message
On Tuesday 19 April 2005 14:27, Ryan A typed: > SELECT * FROM profile_visits WHERE user='adam' ORDER by time_of_visit > DESC LIMIT 10 > As for cleaning up... that's the bit that I can't figure out myself :(. > */ > > Hey, > Thanks for replying. > > > ah! i see. sorry for misunderstanding you. > > No problem, I guess i didnt explain it well enough, and you dont have to > help me but you are trying, so thank you. > > > As for cleaning up... that's the bit that I can't figure out myself :(. > > exactly, I came to the same part as you....but then i would have a LOT of > wasted records without the cleanup... just cant figure it out. Create a cron job that gets a list of profiles, and selects the # of records associated with that profile. If the number is > 10, identify the 10th record and delete records older than that record. Once a week, optimize your tables to reclaim the space. -- My mind not only wanders, it sometimes leaves completely.

« previous php.general (#213355) next »