|
Posted by Duncan Hill on 04/19/05 16:25
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.
Navigation:
[Reply to this message]
|