Extras
Creating Database Tables in phpMyAdmin
When you are creating a new site, or extending an existing one, you can use phpMyAdmin to create and update the structure of a database.
Below, you can see the steps that you need to follow to manually add tables and columns to a MySQL database using phpMyAdmin.
1. Select the database you want to work with.
2. You can add a new table from the Structure tab, or by using the New link under the database name.
3. Specify a name for the table and the number of columns you want it to have (you can change the number of columns later if you need to).
4. Press the Go button.
On the next screen, each row of the table you can see represents one column in the database table you just created. This screen allows you to provide information about each column.
The table below explains the purpose of the main columns.
When you are done, press the Save button.
You can repeat these steps to add further tables to the database (starting by using the New option under the database name again).
Option | Description |
---|---|
Type | The data type that the table will hold (these are different to PHP data types) |
Length/values | Maximum length of the field, or a limited set of possible values |
Default | A default value for the column if no value is given |
Collation | The character encoding that should be used |
Attributes | Extra information about the value (such as whether the a number can be negative or start with leading zeros) |
Null | If selected, indicates that the column is permitted to not have a value |
Index | Specifies that the column should be an index (and the type of index) |
AI | Indicates the value should be an auto-incrementing integer (often used for a primary key) |
Comments | Notes or comments about the column |