Re: Last visitors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux