[Pugged] Moving up and down
Chris Hettinger
ciapug@ciapug.org
Wed, 11 Sep 2002 11:43:06 -0500
Another question!
Again related to my forums. In my forum administration pages I have one =
where I can add, edit, delete, and re-order my categories and forums. I =
would like to ask if anyone has any good suggestions on how to handle =
the positioning, and the re-ordering.
I was thinking I could include a field in the tables for Category and =
Forums, "catPosition" and "frmPosition" which would contain a number 1, =
2, 3... When I then want to move a category up above another I would =
have to do a update on both records, incrementing one's position and =
decrementing the other. Basically when on the management page, I would =
click a link "move up" or "move down" and it would move the category or =
forum 1 spot at a time.
I could also handle this with a position admin page that lists each =
topic and then the forums within and gives a text box with the position =
number in it, then just editing them manually. Then when I display my =
records I can just sort by this field. Definately the benefit here is =
you can do a series of changes easily, rather than one at a time... =
likely the best of the two option.
Both are workable options, just curious which would be the easiest, and =
would there be any considerations I would have to include?
Thoughts?
-ch