FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » use of array_key_exists() to prevent duplicates?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: use of array_key_exists() to prevent duplicates? [message #173043 is a reply to message #173041] Fri, 18 March 2011 17:17 Go to previous message
William Gill is currently offline  William Gill
Messages: 31
Registered: March 2011
Karma:
Member
On 3/18/2011 12:46 PM, Captain Paralytic wrote:
> On Mar 18, 4:34 pm, William Gill<nos...@domain.invalid> wrote:
>> On 3/18/2011 12:15 PM, Captain Paralytic wrote:> Well actually I'm not clear from your OP what you really need. If the
>>> source program produces duplicates of old records as well as new ones,
>>> then provided that the new records come after the old ones, I would
>>> assume that the one you wanted to end up with was the latest one and
>>> so you would not want to use either array_key_exists() or isset().
>>
>> To answer your question, not mentioned in the OP, but mentioned
>> subsequently, edits to the memo field should be maintained.
>
> I did read that, but it doesn't say whether the edit record is the
> first one or the last one. It is this that decides what one you wish
> to keep.

I'm taking info from reports outside of my control or I would edit
records directly, and this exercise would be unnecessary. I take the
flat file output (report) and create a new flat file db with my
edits/additions for tracking, and analysis. I can easily add additional
fields like comments or status. The problem is the "snapshots" from the
source repeat some old records along any new records. I need to capture
only the new ones, message them and update my file. Fortunately source
records have unique serial numbers (transaction numbers) so I can easily
determine if a record has been seen/processed or not.

Sounded like a good candidate for a SQL db, but after initial analysis I
decided that would be a single table db, and was overkill at this time.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Php Modal
Next Topic: Pipe the content of a variable to a process
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:04:07 GMT 2024

Total time taken to generate the page: 0.05931 seconds