【发布时间】:2011-03-25 01:43:40
【问题描述】:
我使用 images_units 连接表在模型 Image 和 Units 之间建立了多对多关系。
如何将此查询转换为 cakePHP find()?
SELECT * FROM Image, Units, images_units WHERE images_units.unit_id = 29;
现在我正在 Image->find('all', $params); 上尝试 find();没有运气。
【问题讨论】:
-
该查询无论如何都不起作用,您根本没有查看连接表。