diff --git a/lib/Db/RoomMapper.php b/lib/Db/RoomMapper.php index cac261e..49948bc 100644 --- a/lib/Db/RoomMapper.php +++ b/lib/Db/RoomMapper.php @@ -22,7 +22,7 @@ class RoomMapper extends QBMapper { $qb->select('r.*') ->from($this->tableName, 'r') ->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id')) - ->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared')) + ->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared')) ->where($qb->expr()->eq('r.id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT))) ->groupBy('r.id'); ; @@ -41,7 +41,7 @@ class RoomMapper extends QBMapper { $qb->select('r.*') ->from($this->tableName, 'r') ->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id')) - ->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared')) + ->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared')) ->where($qb->expr()->eq('r.uid', $qb->createNamedParameter($uid))) ->groupBy('r.id'); ; @@ -59,7 +59,7 @@ class RoomMapper extends QBMapper { $qb->select('r.*') ->from($this->tableName, 'r') ->leftJoin('r', 'bbb_room_shares', 's', $qb->expr()->eq('r.id', 's.room_id')) - ->addSelect($qb->createFunction('count(case when "s"."permission" = 0 then 1 else null end) as shared')) + ->addSelect($qb->createFunction('count(case when `s`.`permission` = 0 then 1 else null end) as shared')) ->where( $qb->expr()->orX( $qb->expr()->eq('r.user_id', $qb->createNamedParameter($userId)),