Remove group members before deleting group

This commit is contained in:
Joshua Ramon Enslin 2024-05-27 03:13:03 +02:00
parent f36938b8dd
commit 205e77da0e
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -127,6 +127,15 @@ final class NodaGroup {
*/ */
public function delete(int $group_id):void { public function delete(int $group_id):void {
$this->_mysqli_noda->update_query_by_stmt("DELETE FROM `v_group_persinst`
WHERE `group_id` = ?", "i", $group_id);
$this->_mysqli_noda->update_query_by_stmt("DELETE FROM `v_group_orte`
WHERE `group_id` = ?", "i", $group_id);
$this->_mysqli_noda->update_query_by_stmt("DELETE FROM `v_group_zeiten`
WHERE `group_id` = ?", "i", $group_id);
$this->_mysqli_noda->update_query_by_stmt("DELETE FROM `v_group_tag`
WHERE `group_id` = ?", "i", $group_id);
$this->_mysqli_noda->update_query_by_stmt("DELETE FROM `group` $this->_mysqli_noda->update_query_by_stmt("DELETE FROM `group`
WHERE `group_id` = ?", "i", $group_id); WHERE `group_id` = ?", "i", $group_id);