num*_*l25 3 php lamp cakephp cakephp-2.x
我很努力地尝试使用set::extract()
或之类的东西找到一个好的解决方案。我想在我的容器中添加一个GROUP BY:
$params = array(
'conditions'=>array(
'Project.id'=>$ProjectId
),
'contain'=>array(
//Gets the User Who owns the Project
'User'=>$user,
'Bid'=>array(
//The User Who owns the Bid
'User'=>$user
),
'ProjectType',
'Os',
'Comment'=>array(
'To'=>$user,
'From'=>$user,
'group'=>"Comment.from_id"
),
),
);
//debug($params);
return $this->find('first',$params);
Run Code Online (Sandbox Code Playgroud)
我不想破解这个问题-有更简单的方法吗?
归档时间: |
|
查看次数: |
3151 次 |
最近记录: |