Blog Home | Fife Visits Blog | Fife Rant Blog | Random Computing Stuff Index

Investigating PHP

I am currently working my way through MySQL for Dynamic Websites by Larry Ullman (edition 4).
I currently (November 2012) run php 5.3.6-13 and a mysql 5.1.66 database on apache 2.2.20 server on Ubuntu 11.10 in VirtualBox.

Chapter 10: Review and Pursue

delete_customer.php: Nov 2012

The php code in the pdf below is my take on part of the 6th and final exercise in Chapter 10 PHP and MYSQL for Dynamic Web Sites (ed4) by Larry Ullman.
Because of the foreign key constraints, the accounts records must be deleted first, but if the customer has no accounts, the script still works: at least when I try it it works.
I have been offering my tuppence worth on the forum at PHP and MySQL for Dynamic Web Sites for the book, but this solution is too long to include there.
Original scripts, databases and css can be found at http://www.larryullman.com/books/php-and-mysql-for-dynamic-web-sites-visual-quickpro-guide-4th-edition/.

If the pdf doesn't open, go to delete_customers.pdf