Vuoi qualcosa come
select a.id as child_id, a.name as child_name,
b.id as parent_id, a.name as parent_name
from forum_categories a
inner join forum_categories b
on a.parent_id = b.id
Per limitare al tuo ID noto, aggiungi
where a.id = knownid
Vuoi qualcosa come
select a.id as child_id, a.name as child_name,
b.id as parent_id, a.name as parent_name
from forum_categories a
inner join forum_categories b
on a.parent_id = b.id
Per limitare al tuo ID noto, aggiungi
where a.id = knownid