Custom order in mysql
16 januari 2010 om 15:32 in English (archived),SQL 1 reactie
Using an order by clause in MySQL is pretty simple. Most people just order alphabetically or by number by using ASC or DESC. However, in my project I needed to sort by a column called mediaType, which was enumerated to contain only ‘video’, ‘image’, ‘pps’ or ‘pdf’. I wanted to sort them in this order as well, however using ASC…
Lees verder...