Avatar of egoselfaxis
egoselfaxis

asked on 

Reordering the priority of database records via drag n' drop using PHP?

I need to program a PHP-based module that allows for the reordering of database records using a drag n' drop interface.  Here's an example of what I mean (this one is done using ASP):

http://www.asp.net/ajax/ajaxcontroltoolkit/samples/ReorderList/ReorderList.aspx

Like the description for this one reads ... the database record should get updated with it's new priority value once the record is dragged n' dropped to it's new location.  

How would I accomplish something like that using PHP/Ajax?  

Thanks in advance,
- Yvan




PHPMySQL ServerAJAX

Avatar of undefined
Last Comment
egoselfaxis
Avatar of rowejd
rowejd
Flag of United States of America image

I don't know of a php package that does it all, but you are probably best off to use scriptalicious:

http://script.aculo.us/

They have code for draggable and droppable areas.  You can use the script for drag-and-drop shopping carts, or to re-order lists, or whatever.  Excellent scripts!
Avatar of rowejd
rowejd
Flag of United States of America image

Here's the "sortable" function you're looking for:

http://script.aculo.us/

And all this stuff is an add-on of the Prototype Ajax framework which you can use with PHP as well as other languages.
Avatar of egoselfaxis
egoselfaxis

ASKER

I'm actually looking for an example that handles the database updates as well. I see that this javascript library one is capable of that, .. I just don't see any PHP-specific examples of it.  Anyone know where I could find one of those types of examples?

- yg

 
ASKER CERTIFIED SOLUTION
Avatar of rowejd
rowejd
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of egoselfaxis
egoselfaxis

ASKER

Thanks so much!  Although I haven't yet tried any of the examples you posted links to, .. I'm confident that they will help me achieve the desired effect.

Cheers!
- Yvan
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo