diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index 7c444ecd..cd76dbe7 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -151,9 +151,12 @@ class ReviewController extends Zend_Controller_Action $uuid = $this->_request->getParam('uuid'); - $sql = "select r.uuid,r.userid,r.ts_created,u.realname,r.mdcomment,r.conclusion from mdreview r + $sql = "select r.id,r.uuid,r.userid,r.ts_created,u.realname,r.mdcomment,r.conclusion,ratt.reviewid from mdreview r left join users u on u.id=r.userid - where r.uuid='$uuid' and r.status>-1"; + right join mdreviewattach ratt on r.id=ratt.reviewid + where r.uuid='$uuid' and r.status>-1 + group by r.id,r.uuid,r.userid,r.ts_created,u.realname,r.mdcomment,r.conclusion,ratt.reviewid + "; $rs = $this->db->query($sql); $rows = $rs->fetchAll(); @@ -170,8 +173,15 @@ class ReviewController extends Zend_Controller_Action $list.='
'.str_replace(array("\r\n", "\n", "\r"),'
',$v['mdcomment']).'