phpgroupware-developers
[Top][All Lists]
Advanced

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

Re: [Phpgroupware-developers] repost handling (was StyleGuide)


From: Lars Kneschke(priv.)
Subject: Re: [Phpgroupware-developers] repost handling (was StyleGuide)
Date: Tue, 27 May 2003 15:45:50 +0000

Dave Hall <address@hidden> schrieb: 
>"Lars Kneschke(priv.)" <address@hidden> wrote:
>

>> Don't know how fast it is, but this are only 3 lines.
>
>
>Yeah ... i understand that, but how do we search for the history_ids?
>
>Maybe we could use a pop to keep it short, dunno.

We could store the history id on the right side.  When we want to lookup the
history id, we just switch the array.

$lastIDs = array ("111111", "222222");
array_unshift ($lastIDs, "555555");

$lastIDs =
(
   [0] => 555555
   [1] => 222222
   [2] => 111111
)

If you want to look up for a specific ID, we do following:

$lastIDs = array_flip($lastIDs);

if(is_set($lastIDs[$newLastID]))
{
   // data sent twice
}

Is that what you mean?

Cu
--
written with FeLaMiMail







reply via email to

[Prev in Thread] Current Thread [Next in Thread]