How do you select columns in a join, I am trying to join using
setIntegrityCheck(true);
$select = $this->select()->setIntegrityCheck(true);
$select->from(array('p' => 'product'))
->joinLeft(array('cp' => 'category_product'),
'cp.productId = p.productId')
->where('cp.categoryId', $categoryId);
gives:
SELECT `p`.*, `cp`.* FROM `product` AS `p` LEFT JOIN
`category_product` AS `cp` ON cp.productId = p.productId WHERE
(cp.categoryId)
But I don't want `cp`.* in the select so I can have integrity check true.
Thx
Keith
没有评论:
发表评论