【发布时间】:2013-08-05 07:38:18
【问题描述】:
我有两张桌子 Center 和 Class。这个 Centerclass 之间的关系。 类中的关系,
'centers' => array(self::MANY_MANY, 'Center', 'centerclass(cl_id, cent_id)'),
和中心的关系,
'classes' => array(self::MANY_MANY, 'Class', 'centerclass(cent_id, cl_id)'),
现在,如果我有中心 id,如何获取与该中心关联的所有类。
请给我这个 Yii 的标准。
谢谢。
【问题讨论】: