Making tables in a database with phpMyAdmin Print

  • 168

This article is going to teach you how to make a table in a database with phpMyAdmin. We are going to assume that you are at this point logged in to phpMyAdmin, and on the main screen. For the purpose of this article , we are going to make a table in a database that has no tables at this time.

Let's begin by picking the database in the blue section that needs a table. Hit on it. In the right hand window, a panel will open. It is to Create a new table. There is a blank box, and you need to type in a Name for the new table. Then in the next box, type in the number of fields this new table is going to have. Once you are ready, click on Go.

Now a new set of boxes will open. These are the blank fields for your new table. You need to enter the details of each field within the new table in the first column. In the second column, you pick the type of entry, such as interger, or decimal, or text, etc. The third column is for the length of the entry, or how many characters long. You may also want to choose a certain field to be Primary key. That is one that will be automatically filled in auto_increment when new entries are added to the table. This is often times an id field, which auto-populates with an id number. To make it Primary key, select the first icon after the Extra box, and mark the radio button. The icon is a page with a key in front of it. Fully complete entering names and information for the rest of your fields. For instance, if you were going to make one field Name, that would be a Char for type character. And you would want to make sure you left enough length for any name that might be entered, so length might be something like 100. Telephone in the field would again be a Char type, and you would want to make the length about 50. When you are finished, please click on the Save Button.

The screen will now show you the table you have created, and the SQL Query. In the blue window, the table will now be listed under the database. This is the end of the article. You already know a way to create a table within a database using phpMyAdmin.


Was this answer helpful?

« Back