Hello,
I want to get some datas of two tables, but I will get an error message:
Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'No reference from table Country to table Prdtype' ...
CountryController.php
PHP Code:
...
$country = new Country();
$countryRowset = $country->fetchAll(array('int_code = ?' => 'de'));
$country = $countryRowset->current();
$produktname = $country->findParentRow('prdtype');
...
Model Country.php
PHP Code:
class Country extends Zend_Db_Table_Abstract {
protected $_name = 'country';
protected $_primary = 'id';
protected $_referenceMap = array(
'Type' => array(
'columns' => array('id_prd_type'),
'refTableClass' => 'prdtype',
'refColumns' => 'id'
)
);
}
Model Prdtype.php
PHP Code:
class Prdtype extends Zend_Db_Table_Abstract {
protected $_name = 'prdtype';
protected $_primary = 'id';
protected $_dependentTables = array('Country');
}
Thanks for help in advance!