I can't think of a time when I wouldn't want to use some sort of database-be it a simple flat-file operational database or a complex relational database-in a Web application. Whether you're saving form data, tracking inventory, or creating dynamic content, if you can grasp basic database concepts, you can begin to create database-driven Web applications. With the advent of open source, fully functional relational databases, dynamic Web applications are no longer only for those with enough money to play the game.
In this chapter, you'll learn some rudimentary database theory, a few basic SQL statements, and how to use PHP to connect and retrieve information stored in MySQL, PostgreSQL, Oracle, and Microsoft SQL Server database tables. These database types are only a few from the long list supported by PHP.
After this chapter, the remaining examples used in the book will be based on MySQL. However, the introductory examples for the other databases in this chapter will provide all you'll need to know to re-create the examples in this book for these other database types. If you need additional help, refer to the specific database section of the PHP Manual, online at http://www.php.net/, to find the functions for your particular database type.