How to Implement Natural Sorting in MySQL – Sky Blue Sofa Blog

How to Implement Natural Sorting in MySQLPosted by Dave Rogers // December 20, 2013 // in Blog // 0 CommentsIn the programming world, Natural Sorting is taking a list of things and sorting them, well, the way a human naturally would. Take this list, sorted in natural order, for example:col_name————— test1test2test3test4test5test6test7test8test9test10test11test12MySQL sorting doesn’t work, naturallyIn PHP, you could use the natsort function to sort an array to return an alphanumeric list in the order given above. But we’re talking about MySQL here. In MySQL we would normally run this query:

via How to Implement Natural Sorting in MySQL – Sky Blue Sofa Blog.

Leave a Reply

Your email address will not be published. Required fields are marked *