Simple steps for creating the database in MySql for PHP.Just follow the below steps.
1.Start the wamp server and then select the localhost from wamp server pop menu as shown in below figure or just type the http://locahost/ .
5.After clicking on the create button you will get the new window in which you will have to enter the Table name and number of columns in the table as shown in figure.Enter the Table Nameand Column Name and click on the GO.
6.After clicking the GO you will get the screen in which you will have to enter the all information of each and every column(column name,data type and size).
Sample is given below.
Field Type Length/Values
Name VARCHAR 30
Mobile_No DECIMAL 10,0
7.Rules for the field name.
- Field name should be start with a-z,A-Z or _.
- Field name should not be start with 0-9 or any other special character like @,#,$.
- Field name should not be a any reserved words of the mysql like int,varchar,decimal etc...
- If the data type of the field are INT,TINYINT,BIGINT,DATE,DATETIME,then there is no need to give a size.Just leave the Length/Values column blank for those field as shown in the example for the ID field.
- If the data type of the field is the DECIMAL, then enter the size as shown in example.Digits before point,digits after point.
- If you want to define any field as Primary key then select the primary key radio button on the right side.
8. After inserting details of all the field the just click on the Save.
9.After clicking on the Save button your data base is ready to use with PHP page.
I'll explain you how to use database in the PHP page in the next BLOG.
If you like this blog and helpful to you then leave the comment for this blog that will help me to continue with BLOG .Waiting for response.
Also let me know in case of you have any problem in creating the database using these steps.