Reply to Re: [PHP] Last visitors

Your name:

Reply:


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.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация