I would like to know to translate this requete oracle into mysql.
Without the clause "start with" and "connect by".
SELECT cd.CATEGORIES_NAME FROM CATEGORIES_DESCRIPTION cd,CATEGORIES c
WHERE cd.CATEGORIES_ID= c.CATEGORIES_ID
start with c.PARENT_ID == 0
connect by c.PARENT_ID = c.CATEGORIES_ID
example :
+------------------------------+---------------+-------------+
| CATEGORIES_NAME | CATEGORIES_ID | PARENT_ID |
+------------------------------+---------------+-------------+
| Apples | 21 | 27 |
| Golds | 23 | 21 |
| Grany | 24 | 21 |
| Golden | 25 | 21 |
| Fruits | 27 | 0 |
| Banana | 21 | 27 |
| Vegetables | 28 | 0 |
+------------------------------+---------------+-------------+
Result :
|-Fruits
|--- Apples
|----- Golds
|----- Golden
|----- Grany
|--- Banana
|-Vegetables
Thank you. ;-)
PS: For when the migration of this clause?
Chauvier L
info@v-ga.be