修复计数不准的问题

This commit is contained in:
wlx 2014-01-09 12:27:07 +00:00
parent 4f5ccf02d7
commit 055b5a6af2
1 changed files with 1 additions and 1 deletions

View File

@ -1463,7 +1463,7 @@ class ServiceController extends Zend_Controller_Action
echo 0; echo 0;
return; return;
} }
$sql = "select count(md.id) as total from mdref mr $sql = "select count(distinct md.id) as total from mdref mr
right join normalmetadata md on md.uuid=mr.uuid right join normalmetadata md on md.uuid=mr.uuid
where mr.refid=$id"; where mr.refid=$id";
$rs = $this->db->query($sql); $rs = $this->db->query($sql);