A Contact Database using MySQL and PHP
By Mike Miller
MySQL, the "free" database for the Web, has a small, highly optimized database engine that implements the entry-level SQL92 specification. Its rich set of support tools lets you create dynamic Web applications such as catalogs, shopping carts, and contact lists. In this article, I will introduce
MySQL and show how to develop a simple Web interface to a contact database using
MySQL and PHP, a server-side scripting language that can be built into the Apache server, or run as a FastCGI. This combination offers speed, security, and a rich feature set. Best of all, both Apache and PHP are absolutely free.
To demonstrate what you can do with MySQL in a Web context, I've created a Web address book with a twist -- the capability to add time-stamped, single-line comments to address entries and retrieve them later, sorted by date. This turns the address book into a simple contact database, with plenty of room to add features.
The contact database requires two tables: the contact table, which contains the address-related information and a hook for the comments -- in this case, the user ID field; and the comment table.
|