PHP Classes

Sortable Elements: Display MySQL records in a sortable HTML table

Recommend this page to a friend!
  Info   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 54%Total: 2,294 All time: 1,703 This week: 67Up
Version License PHP version Categories
sortable_elements 1.0GNU General Publi...3.0HTML, Databases, AJAX
Description 

Author

This class can be used to display MySQL database table records in an HTML table that can be sorted by dragging rows.

It generates HTML and Javascript to display the records of a MySQL table in HTML table rows that can be dragged to sort the table elements.

The class sends AJAX requests to send changes of the table elements to the server so the changes can be stored in the MySQL table without having to reload the page.

Innovation Award
PHP Programming Innovation award nominee
February 2008
Number 2


Prize: One book of choice by Packt
There are plenty of solutions to display data from databases in table grids that allow the user to according to the values a given column.

This package provides a solution to different problem, which is the need that certain applications have to let their users sort data to their own criteria.

The package provides an elegant user interface that lets users drag the entries of the listed database records and drop them in whatever position the users want. The class uses AJAX to commit the sorting changes without reloading the current page.

Manuel Lemos
Picture of Sean Dempsey
Name: Sean Dempsey <contact>
Classes: 3 packages by
Country: United States United States
Age: 39
All time rank: 23728 in United States United States
Week rank: 192 Up22 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

Screenshots (3)  
  • screenshot1.gif
  • screenshot2.gif
  • screenshot3.gif
  Files folder image Files (20)  
File Role Description
Files folder imagejs (2 files)
Files folder imagescriptaculous (9 files)
Plain text file ajax_save.php Aux. ajax file to allow asyncronous editing
Plain text file db.php Example sample database connectivity script (with excellent functions for querying a mysql db)
Plain text file example.php Example Test script
Plain text file sortable_elements.css Data css file to assist visualization of sorting
Plain text file sorting.inc.php Class Class file
Image file warning.gif Icon icon to go with report or error message

  Files folder image Files (20)  /  js  
File Role Description
  Plain text file ajax_functions.js Data javascript base ajax functions
  Plain text file javascript_functions.js Data base javascript functions

  Files folder image Files (20)  /  scriptaculous  
File Role Description
  Plain text file builder.js Data part of scriptaculous package
  Plain text file controls.js Data part of scriptaculous package
  Plain text file dragdrop.js Data part of scriptaculous package
  Plain text file effects.js Data part of scriptaculous package
  Plain text file prototype.js Data part of scriptaculous package
  Plain text file scriptaculous.js Data part of scriptaculous package
  Plain text file slider.js Data part of scriptaculous package
  Plain text file sound.js Data part of scriptaculous package
  Plain text file unittest.js Data part of scriptaculous package

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:2,294
This week:0
All time:1,703
This week:67Up
User Ratings User Comments (1)
 All time
Utility:80%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:65%StarStarStarStar
Tests:-
Videos:-
Overall:54%StarStarStar
Rank:2136