我想在我的查询中加入连接,但我无法获得任何成功,如果表中存在,我想productname
从product
表中找出。product_id
productplan
Producttable
id name
1 a
2 b
productplantable
id product_id
1 1
2 2
这是我的查询:
$p_products = $this->ProductPlan->find('all',
array('fields'=>
array('ProductPlan.product_id',
'Product.name')
)
);
$this->set('p_products',$p_products);