Hi, I'm curious if the follwoing can be done.
First, here's sample table data
I want to perform a query which returns the ids like;
I'm using mysql 4.1
Any hints would be a great help. thanks in Advance.
First, here's sample table data
Code:
| id | parent | ordering |
| 1 | 0 | 1 |
| 2 | 0 | 2 |
| 3 | 0 | 3 |
| 4 | 2 | 1 |
| 5 | 2 | 2 |
I want to perform a query which returns the ids like;
Code:
1
2
4
5
3
I'm using mysql 4.1
Any hints would be a great help. thanks in Advance.