I have a hierarchical table with some data in it. I've handled sorting them in a hierarchical way but there is a bug in it. I use a field named `Path` to do this. let's look at the table first:
[![enter image description here](https://i.stack.imgur.com/IvD6s.png)](https://i.stack.imgur.com/IvD6s.png)

The problem here is that mysql compares each pair of Paths as text. That if you look at those last two rows, 15 is bigger than 6 and should be swapped with the row under it.

My question is how can I compare each part of the path as numbers separated by dots?