mirror of https://github.com/sualko/cloud_bbb
fix: quoted column names
parent
72304541cf
commit
726b18e2c6
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue