/** * Deletes the specified mandant from the system; all events for this mandant will also be deleted * Only if no user with this mandant exists * Returns TRUE on success, FALSE otherwise * * @param int $mandantID * @return boolean */ public static function deleteMandant($mandantID) { global $wpdb; if (!EventDatabaseManager::usersWithMandantExist($mandantID)) { $query = "DELETE FROM datr_Mandants WHERE mandantID = {$mandantID}"; $res = $wpdb->query($query); return $res; } return false; }