Can I reorder a list in Flex and have it reflect in the db?
Bit of a tricky one here for me, let''s say i have a database with 5 entries, with a column called 'priority' which is set to numeric with values 1 - 5, and when i query the database i order them asc, ie:
I then show these items in a List control in Flex, now what i'm trying to do is develop something where i can reorder these in the database, ie changing the priority number.
<cfquery name="q" datasource="#dsn#">
ORDER BY priority asc
I've tried using a drag and drop into another list control to reorder them, and that's fine visually, but how would i send that ordered list into the database?
Another thought i had was perhaps to have move up/down buttons, so that when an item is selected in the List control, it would grab the ID and priority from the database, then preform a calculation (don't know what) to +/- 1 from the priority, but it's a bit much for me to work out on my own, and also how would the others in the database get re-arranged?
Does anyone here have any experiance with this sort of thing or could someone point me in the right direction for a good tutorial on something simular? Any help would be gratefully appreciated! :)
Many thanks in advance all! :D