O'Reilly logo

PHP and MySQL for Dynamic Web Sites: Visual Quickpro Guide, Second Edition by Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Choosing Your Column Types

Before you start working with SQL and MySQL, you have to identify your application’s needs. This then dictates the database design. For the examples in this chapter, I’ll create a database (generically called sitename) that stores some user registration information (which will then be incorporated into Chapter 7). The database will consist of a single table, users, that contains columns to store user ID, first name, last name, email address, password, and registration date. Table 4.1 shows the current layout, using MySQL’s naming rules for column titles (alphanumeric names, plus the underscore, with no spaces).

Table 4.1. The users table will have these six columns, to store records like the sample data here.
users ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required