On Tuesday 19 April 2005 17:03, 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

Cons: 
0. there are 3 queries: select, insert/update, delete
1. you're using more than 1 query
2. your logic is tough ;-)
3. you've mixed the php and mysql logic together.

Check my reply.

>
> If i am missing anything or you see any problem in my logic, please point
> it out.
>
> 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

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436

Attachment: pgp3WRVppS0aV.pgp
Description: PGP signature

Reply via email to