[thelist] MySQL/PHP design question : order in a DB table.
Ned Baldessin
ned-ml at idsland.com
Wed Jul 23 09:11:03 CDT 2003
> don't assign the values consecutively
>
> your list with saner 'ordered' values --
>
> 20 Aaa
> 40 Bbb
> 60 Ccc
>
> becomes
>
> 17 Bbb
> 20 Aaa
> 60 Ccc
I'm affraid I don't understand : how do you know you have the change the
'Bbb' row to 17, and not 8 or 57 ?
You still have to read the value of the previous (or next) row, and
possibly change it too if there is a collision between the two, right ?
I guess I could write a function to get the previous (or next) row, and
swap its number with the current row. Hum.
More information about the thelist
mailing list