[eluser]Dam1an[/eluser]
Firstly, you can't always assume people will get back to you immediatly, so wait more then 4 and a half hours before bumping the thread
Secondly, what exactly is the relcats table, you only mention the cats and subcats tables in your post
On a side note, can you not just have all this in a single table, with id, parent_id, name, etc...
Also, can you try explain a bit more exactly what you're trying to acheive
Also, you might be getting a nameing conflict, as you have $DataSet in the outer loop, and then assigning another result to it (but will then carry on with the outer loop again)