prepare('UPDATE info_productos SET column_id = NULL WHERE column_id = ?'); $stmt_update->execute([$id]); // Then, delete the column $stmt_delete = $pdo->prepare('DELETE FROM kanban_columns WHERE id = ?'); $stmt_delete->execute([$id]); } } header('Location: kanban.php'); exit;