PHP/MySQL Tutorial – Creating a database table

By | March 13, 2013

PHP/My SQL Tutorial: How to create a database table?

Firstly, create a table and fix the corresponding fields in it before proceeding and making any amendments in your database.

If you want to create a table in PhpMyAdmin it’s quite simple and easy as you have to type the name, select the numbers of field and click on GO button. Directly you will be taken to the set up screen where you want to create fields for the database. We provide Cloud Hosting India

PHP-MySQL01

On the other hand, run My SQL query to create a table in the give format:

CREATE TABLE tablename (Fields)

The fields are described as follows:

Fieldname type (length) extra info,

Separate the fields by comma.

For e.g. if you want to create a table (known as Members) with 3 fields – First Name, last name and age , then implement the given query:

CREATE TABLE Members
(
First Name varchar (15),
Last Name varchar(15),
Age int
);

We provide linux web hosting india

Leave a Reply