MySQL record ordering

Razer

New Member
In one of my current projects I have a dropdown (select) form element. I populate the options using an array (PHP):\[code\]$regions=array( 1=>'North West', 2=>'North East', 3=>'South West', 4=>'South East',);\[/code\](array key=option value, array value=http://stackoverflow.com/questions/3653441/option text)Now this offers me the convenience of being able to re-order the options as I wish.The problem is now my client wants to be able to add/modify/re-order options from an admin interface. This means I now need to put these options in to a database table.What that also means is that there is no easy way (not that I'm aware of) of putting the records in a custom order.Let's suppose I create a regions table that includes a 'sort_order' field. Does anybody know of any solutions that will allow the client to re-order the records from an interface using simple up/down buttons?
 
Back
Top