0
我的模型中有以下代碼。我希望展示個人和專業。但目前我的下面的代碼不工作,因爲我只是加了一個加號來獲得兩個。單獨我能夠顯示個人或專業。如何更改下面的代碼以顯示個人和專業的所有結果?返回用戶的cakephp中的所有結果
function getAll($in_id){
$this->PassionsUser->id = $in_id;
return $this->PassionsUser->find('all', array(
'conditions' => array(
'PassionsUser.user_id' => $in_id,
'PassionsUser.type' => 'personal'
)
)); + $this->PassionsUser->id = $in_id;
return $this->PassionsUser->find('all', array(
'conditions' => array(
'PassionsUser.user_id' => $in_id,
'PassionsUser.type' => 'professional'
)
));
}