Search code examples
zend-frameworkone-to-manyconditional-statementszend-db-tabletable-relationships

Zend Framework get dependent rows following a certain condition


I want to retrieve rows from a dependent table that follows a given criteria in the dependent table.


Solution

  • If you're using table relationships, you can provide a Zend_Db_Table_Select object as an argument to findDependentRowset

    $row->findDependentRowset($table, $rule, $select);
    

    See more info at http://framework.zend.com/manual/en/zend.db.table.relationships.html#zend.db.table.relationships.fetching.dependent