This seems like it should be so easy... I have a categories table, that has catid and parent id. If a category is root, then its parent is null. I also have articles in a table with fields id, name, catid.
For instance, there could be category Europe, and subcategories Germany, France. Then in articles table there would be the catid.
I need to do a query so that for a given catid, I get all the articles who have the parent id for that catid. Or, given the parent id a query to likewise give me all articles with that parent id. However, article table only contains catid, not parent id.
I just can't figure out if I need to do one of many variations of joins, unions, etc.
And meant to say should be sorted by article date.
Thanks!