JPaul has asked for the wisdom of the Perl Monks concerning the following question:
I want to build a master summary with all the items entered by one user at each grouping. What I am currently doing (just to get it running) is I keep an internal ID of this series of items you submit, giving the same "batch ID" to each item submitted in a row, and when you hit the final Submit button, it pulls everything out with that Batch ID and groups them together into one entry for the Summary Page.
Now this is all well and good, and if nothing goes wrong, works nicely - but what if something does go wrong? What if the browser crashes, or the user hits another link (etc...) - and we lose that chain. Now all the items have been entered into the DB - but I don't know when to go and group them... Not to mention keeping batch numbers is pretty ugly
What is the best way of doing this?
I have thought of datestamping the items, and then every half-hour grouping them and making the summary - but if you're still entering stuff when that half-hour hits, then whatevers entered after that isn't grouped.
I could also do the grouping when the user logs out - But what if they only enter one item a couple times a day, and logout in between - so I end up with a bunch of single items in each summary?
I hope this is relatively clear on what I'm doing, and what I'm asking. All suggestions would be appreciated.
The idea is to group these items together in the most intelligent manner... But I'm not expecting to group EVERYTHING they did together, rather maybe make up a list only once a day - but still, I want it to appear somewhat real-time as well...?
Am I asking for just too much functionality for what should be a simple feature? Are these too many conflicting "I wants" that just can't go together? Am I completely confusing?
My thanks for your opinions on the matter,
JP
-- Alexander Widdlemouse undid his bellybutton and his bum dropped off --
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A CGI chained-event theory question
by rob_au (Abbot) on Feb 04, 2002 at 10:13 UTC | |
|
Re: A CGI chained-event theory question
by screamingeagle (Curate) on Feb 04, 2002 at 06:04 UTC | |
|
Re: A CGI chained-event theory question
by termix (Beadle) on Feb 04, 2002 at 14:33 UTC | |
|
Re: A CGI chained-event theory question
by shotgunefx (Parson) on Feb 04, 2002 at 11:02 UTC | |
|
Re: A CGI chained-event theory question
by JPaul (Hermit) on Feb 04, 2002 at 18:23 UTC | |
by Ryszard (Priest) on Feb 04, 2002 at 23:54 UTC |