Sorting through SQL result sets

This year is the year of the webshop. I’ve completed already two projects where we deployed a shop written in PHP, sitting on a MySQL backend. And since I had to deal with a sorting issue twice last week, I decided to write a tutorial on the topic.