Hello,
Maybe someone here can help me with a problem I'm having, It seems that this is beyond the people on Devshed.com.....
I have a table with 5 columns but only 2 are significant for this question:
id - unique id of item
ordering - int, the way the items are "ORDER BY" when the end user views them.
The administrator is able to change the "ordering" field to any order he/she likes. The problem I am having now is the following:
- How do i show the entries to the admin in such a manner that he/she can re-order them. Right now i have it like this:
(radio button) <-- move here
ITEM INFO (ordering = 1)
(radio button) <-- move here
ITEM INFO (ordering = 2)
(radio button) <-- move here
so on and so forth, but this method poses some problems because of the first and last entries. i read another post on here and someone mentioned having up and down arrows next to each item. this might work a little better i think.
The second problem i am having is the actual code for moving the ordering column values around. as it is right now, with my current while loop it is incrementing some ordering columns 2 times when it should only be once and incrementing values once that should not be incremented and then sometimes it works fine. I'm just not sure what to do. Thank you ahead of time