I have two MySQL tables: “sec” and “art”.
“sec” is for a section menu and sub-section:
id - sid - name
1 - 0 - video
2 - 1 - funny.video
3 - 1 - video.clip
4 - 1 - movies
5 - 0 - MP3
6 - 5 - English.Song
7 - 5 - Russian.Song
“art” is for an articles menu for all sections and subsections:
id - sid - name ---- ("sid" = "id" of section from "sec" table)
1 - 1 - aaa
2 - 1 - bbb
3 - 2 - ccc
4 - 3 - ddd
5 - 4 - eee
6 - 5 - fff
7 - 7 - ggg
How do I get all articles in Video (ordered by id) and all subsections of it (funny, clip, movies)?
You will probably want to use a subselect for this.
If you only want the chosen and first level subsections, something like this will work (untested).