Without going into too much detail (I can if it's needed), I need to have a way to purge all addresses for a customer, with the exception of their default address.

The SQL that needs to be run is:
DELETE FROM address_book WHERE customers_id = {customer id} AND address_book_id <> {customers' default address book id}

But rather than run it through phpmyadmin, I would like to run it from the admin's customer.php page - either in the customer list, or on the customer details screen. A "Purge Addresses" button in either of those locations would be perfect.

Does anyone have any hints on how I would go about implementing this? We need to lookup the customer's default address id (customers.address_book_id) first, then run the SQL.

Thanks in advance!