O'Reilly logo

Learning Flex 4 by Elijah Robison, Alaric Cole

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

Creating a Database with phpMyAdmin

Re-creating contacts.xml as a MySQL database will involve four steps:

  1. Creating the contacts database

  2. Creating the contact table

  3. Activating six fields for the table (id, type, first, last, email, and phone)

  4. Inserting some records

Creating the Database

To get going, start WAMP, open the WAMP menu, and launch phpMyAdmin. The “Create new database” utility is located near the middle of the screen. Supply contacts for the database name and click on Create (Figure B-1).

In the next view, you’ll be prompted to add a table.

Creating the Table

Where you see “Create new table on database”, provide the name contact and enter 6 for the number of fields. Then click Go (Figure B-2).

Creating the contacts database using phpMyAdmin

Figure B-1. Creating the contacts database using phpMyAdmin

Creating the contact table with six fields

Figure B-2. Creating the contact table with six fields

As you submit commands using the GUI, notice that phpMyAdmin will output the SQL it builds to carry out your instructions. This is a handy feature that allows you to gradually absorb some SQL over time.

With the database and the table defined, now it’s time to add the attribute fields.

Adding Fields

After creating the table, phpMyAdmin should have moved you ahead to add six fields. This is a rather wide page, but we’re mostly interested in the far left and the far right.

While you’re still ...

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