[thelist] SQL user-defined order
Hassan Schroeder
hassan.schroeder at gmail.com
Wed Oct 10 12:28:29 CDT 2007
On 10/10/07, Matt Slocum <matt.slocum at gmail.com> wrote:
> I'm actually doing a lot of DOM scripting already. When the user
> rearranges the list in the browser I need the changes saved in the
> database. There probably won't be more than 50 records, but my
> personality wants to do it efficiently.
>
> Also, I'm using AJAX to submit the new arrangement every time there is
> a change. So if the user completely rearranges even 50 items, it will
> go through all the work for each change.
How fast can a user move something around? Unless you've got a
huge number of users simultaneously rearranging things, I'd say it
just isn't a big deal :-)
And that's exactly how I handle a similar situation with ~20 categories:
capture the DOM order of the elements and pass it by AJAX as a comma
separated list, which is exploded and used to update a table in the DB.
FWIW,
--
Hassan Schroeder ------------------------ hassan.schroeder at gmail.com
More information about the thelist
mailing list