One other thought: why do you need nested queries at all? Assuming you have a schema something like this:
create table category
(
id int auto_increment,
name text,
...
 ðŸ˜‰;
create table forum
(
id int auto_increment,
cat_id int, / references category.id /
name,
...
 ðŸ˜‰;
You should be able to get everything all in one gulp by saying:
select category.id, category.name, forum.id, forum.name, ...
from category, forum
where forum.cat_id = category.id
order by category.name, forum.name