So I have a category table set up. Within this table there is a field called "id", "name","fk_parent_cat_id" (and more). The "fk_parent_cat_id" basically just ties one particular category to a parent category.
Ok. That being said, how would I make a query that grabs the information on the category, but ALSO grabs the information on the parent category. My main concern is that right now I am only grabbing the parent id, which is nice, but I dont want to have to run another query to identify the name of the parent category.
A normal query result would be something like:
id: 2
name: category 1
fk_parent_cat_id: 1
And, I want the result to be
id: 2
name: category 1
fk_parent_cat_id: 1
fk_parent_cat_name: top category
Does this question make sense? I figure there is a way to do this with some sort of join...
Thanks for any inptut!