My database contains tables for items, sub_categories and categories. Items sit within a sub_category (defined by items.sub_category_id = sub_categories.id), which in turn sit within categories (defined by sub_categories.category_id = categories.id).
How can I return the name of the parent category for my items when I call Item->find('all')?
I thought I might be able to use an assoc array, like this: