<?php
require_once '../../config.php';
require_once ROOT . 'app/db.php';
// $db = new db();
// $db->setPrimaryKey('ID');

db::update("tb_daire", $id, ['aktif' => 0]);
db::execOne("UPDATE tb_apartman SET kayitli_daire = kayitli_daire - 1 WHERE ID = ?", [$daire->apartmanID]);

header("Location: index.php");
exit;
