You are here: Re: [PHP] Last visitors « PHP « IT news, forums, messages
Re: [PHP] Last visitors

Posted by Ken on 04/19/05 16:34

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@coinpass.com> 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
>
>

 

Navigation:

[Reply to this 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

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