RE: Last visitors

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

 



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


[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