Skip to content

Commit

Permalink
Postgres database error "operator does not exist: boolean = integer" #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Nov 20, 2023
1 parent 658599b commit 681bbc0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion adm_program/system/classes/Organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function createBasicData($userId)
// create default category for roles, events and weblinks
$sql = 'INSERT INTO ' . TBL_CATEGORIES . '
(cat_org_id, cat_uuid, cat_type, cat_name_intern, cat_name, cat_default, cat_sequence, cat_usr_id_create, cat_timestamp_create)
VALUES (?, ?, \'ROL\', \'COMMON\', \'SYS_COMMON\', 1, 1, ?, ?)';
VALUES (?, ?, \'ROL\', \'COMMON\', \'SYS_COMMON\', true, true, ?, ?)';
$queryParams = array($orgId, Uuid::uuid4(), $systemUserId, DATETIME_NOW);
$this->db->queryPrepared($sql, $queryParams);
$categoryCommon = $this->db->lastInsertId();
Expand Down
4 changes: 2 additions & 2 deletions adm_program/system/classes/TableRoles.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function delete()
FROM '.TBL_ROLES.'
INNER JOIN '.TBL_CATEGORIES.'
ON cat_id = rol_cat_id
WHERE rol_default_registration = 1
WHERE rol_default_registration = true
AND rol_id <> ? -- $rolId
AND cat_org_id = ? -- $GLOBALS[\'gCurrentOrgId\']';
$countRolesStatement = $this->db->queryPrepared($sql, array($rolId, $GLOBALS['gCurrentOrgId']));
Expand Down Expand Up @@ -531,7 +531,7 @@ public function setValue($columnName, $newValue, $checkValue = true)
FROM '.TBL_ROLES.'
INNER JOIN '.TBL_CATEGORIES.'
ON cat_id = rol_cat_id
WHERE rol_default_registration = 1
WHERE rol_default_registration = true
AND rol_id <> ? -- $this->getValue(\'rol_id\')
AND cat_org_id = ? -- $GLOBALS[\'gCurrentOrgId\']';
$pdoStatement = $this->db->queryPrepared($sql, array((int) $this->getValue('rol_id'), $GLOBALS['gCurrentOrgId']));
Expand Down
2 changes: 1 addition & 1 deletion adm_program/system/classes/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function assignDefaultRoles()
FROM '.TBL_ROLES.'
INNER JOIN '.TBL_CATEGORIES.'
ON cat_id = rol_cat_id
WHERE rol_default_registration = 1
WHERE rol_default_registration = true
AND cat_org_id = ? -- $this->organizationId';
$defaultRolesStatement = $this->db->queryPrepared($sql, array($this->organizationId));

Expand Down

0 comments on commit 681bbc0

Please sign in to comment.