Forum Moderators: coopster
I would like some help on a fairly simple sql query.
I have a tree structured table and would like to select all of the child entries of a certain entry, as so:
$sql = "SELECT * FROM content WHERE parent_content_id = 6";
In this same query I would also like to know the number of children each child entry of entry 6 has.
I'm guessing I need to do some sub query and group the children together, but have no idea as to how I may do this.
I couldn't find an sql section, so hopefully no one will mind me popping it in the PHP area.
Thanks.