Topic awaiting preservation: Sorting emails based upon forwarded etc - BUT STUCK !! HEEEELP!!! (Page 1 of 1) |
|
---|---|
Bipolar (III) Inmate From: you tell me |
posted 12-24-2008 07:27
I've been hacking away at trying to work out a stupid algorithm for the mailing program Im working upon. The thing is that we download emails to our own database and I've fixed it so you can view all downloaded emails on a page. The thing is that from thsi page is the provision to forward and reply emails. Ok I've set it so that when a message is downloaded into our Database its supposed to be listed as follows: code: all_replied_email_ids = get_email_ids_replied_to(all_email ids) remove_email_ids_replied_to(all_email ids) foreach(all_email_ids as one_email) show email if(email was replied to) show replied to email from all_replied_email_ids; Loop
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 12-24-2008 14:20
quote:
|
Bipolar (III) Inmate From: you tell me |
posted 12-24-2008 18:10
Yeah thats fine but in this case the child messages have further child messages and its a bit recursive you know like a forwarded message can be forwarded and so forth. The process is recursive and I have no idea how to do so - really need some ideas here |
Bipolar (III) Inmate From: you tell me |
posted 01-02-2009 20:40
Well I figured out how to get this done - I handed it to a co worker and he mixed up a recursive function that does the work wonderfully. Guess if you cant beat it - let someone else do it |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 01-03-2009 18:38
well, in php 4, the trick will have been |