How to create fast database queries

Archive for March 29th, 2009

Sorting lists: moving blocks

Comments enabled. I *really* need your comment

This is article 5 of 6 on linked lists in MySQL:

Now, let's discuss the mass updates.

In some user interfaces it is needed sometimes to select a whole block of items and move it towards the top or the bottom of the list all at once.

This may be useful to manage MP3 playlists, photo stacks, etc.

With linked lists, it's quite simple. Just like in case of moving a single item, we need to update only three rows.

Moving the items in block, though, requires some more checking:
Read the rest of this entry »

Written by Quassnoi

March 29th, 2009 at 11:00 pm

Posted in MySQL