[英]How to use Zend_Db_Table with many to many relationships
在文檔中: 通過多對多關系獲取行集
要獲取一行:
$row->findManyToManyRowset($table,
$intersectionTable,
[$rule1,
[$rule2,
[Zend_Db_Table_Select $select]
]
]);
// Example
$productsRowset = $bug1234->findManyToManyRowset('Products',
'BugsProducts');
// Here, BugsProducts is the junction table
但是,對於一對多關系,您還需要在類中定義該關系: 定義關系 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.