[eluser]woomacoder[/eluser]
[quote author="Dam1an" date="1240610836"]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)[/quote]
Thank's for reply; sorry form my hasty...
I Have two table: CATS and SUBCATS; I wanna extract all records of cats and ONLY records of SUBCATS that related with CATS; example:
cats contain:
ID NAME SUBCATS
1 A 0
2 B 2 (contains 2 subcategories)
subcats contain:
ID ID_CAT NAME
1 2(id of cats) SUBA
2 2 SUBB
I wanna extract all and printout that:
A
B
-- SUBA
-- SUBB
[...]