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

Posted by Mike Hummel on 04/19/05 17:32

just do a select limit 11
display up to 11... if less then 11, you might want to display them anyways.
you should be able to deal with up to a million + records, so select
will stay quick, esp if you make the right fields indexed.

you can take care of purging via crons...
you might find you want the history in the end...

-m

Ryan A wrote:
> Hey!
> I think I solved this:
>
> select 11 latest visitors
> count to see if it returned 11 records,
>
> if (count == 11){
> get the oldest (of the 11) visitors time
> delete everything from that record and older than that
> }
> else{}
>
> Pros: max 2 queries
>
> If i am missing anything or you see any problem in my logic, please point it
> out.
>
> Thanks,
> Ryan
>
>
>

 

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

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