bindValue('user_id', $userId); $addRelation->bindValue('subject_id', $subjectId); $addRelation->bindValue('type', $type); $addRelation->execute(); return $addRelation->execute() ? MSZ_USER_RELATION_E_OK : MSZ_USER_RELATION_E_DATABASE; } function user_relation_remove(int $userId, int $subjectId): bool { if ($userId < 1 || $subjectId < 1) { return false; } $removeRelation = Database::prepare(' DELETE FROM `msz_user_relations` WHERE `user_id` = :user_id AND `subject_id` = :subject_id '); $removeRelation->bindValue('user_id', $userId); $removeRelation->bindValue('subject_id', $subjectId); return $removeRelation->execute(); }