in reply to reordering a stack with little effort
Instead of this system of using fractional question numbers, I would consider giving the questions a simple incrementing integer for identification, and having the order of the questions be stored by other means. A simple system for maintaining order might be a linked list. A table to hold this information could look something like this:
id | next ----+------ 1 | 2 2 | 3 3 | 4 4 | NULL
Then, if someone asks you to insert a question between 2 and 3, you would simply have to change it like so:
id | next ----+------ 1 | 2 2 | 5 5 | 3 3 | 4 4 | NULL
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: reordering a stack with little effort
by sgifford (Prior) on Mar 11, 2005 at 06:57 UTC | |
by Crackers2 (Parson) on Mar 11, 2005 at 19:21 UTC | |
by punkish (Priest) on Mar 11, 2005 at 14:17 UTC | |
by simonm (Vicar) on Mar 11, 2005 at 15:50 UTC |
In Section
Seekers of Perl Wisdom