Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return $this->fetchAll(
- $this->select
- ->from(array('p' => $this->_name), array(
- 'privilegeId' => 'p.id',
- 'resources' => new Zend_Db_Expr("GROUP_CONCAT(CONCAT_WS('-', re.id, re.name) SEPARATOR ',')")
- )
- )
- ->join(array('re' => 'resource'), 're.id = p.resource', array(''))
- ->join(array('ro' => 'role'), 'ro.id = p.role', array('roleId' => 'ro.id', 'roleName' => 'ro.name'))
- ->order('p.id ASC')
- ->group('ro.name')
- );
Add Comment
Please, Sign In to add comment