Custom sort – jQuery UI, AJAX, PHP & MySQL

In this tutorial, you will learn how to implement custom sorting in your PHP website. For example you are working on blog website where you have posts, now you can order your posts by ID, title or by creation date. But what if you want to custom order the posts. For example, you want post A to appear right after post B no matter if their ID or title or date is of different date.

That is where you need a custom ordering algorithm. Another example would be an E-commerce PHP website where you have products. In most of the popular CMS like WordPress, Magento or Joomla you can display the products in order by ID, title, creation date, price or even by number of sales. Now suppose you want product A to appear right after B no matter if the price or number of sales of product A is less or greater than product B. That is another common scenario where you will need to customize the order of products or posts or whatever you content you have in your MySQL database.

In this tutorial, you will learn use of jQuery UI and DataTable. jQuery UI is an extension to jQuery and it mostly focused on design elements. For example, it has beautiful autocomplete, datepickers, dialogs, menus, progress bars, right click context menu, sliders for selecting range, spinners and much more.

DataTable is a library which is used to display data in tabular form but with more functionality, like search bar, pagnation, ordering data, sorting data using drag and drop and much more.

Post Author: hatefull