Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsreip
     
    Hi,

    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:

    Item->find('all', array('sub_category'=>'category'))

    But it seems I was wrong.