Home Tutorial Php Phpdatabase PHP Insert Value

 
 

PHP Insert Value
Posted on: November 2, 2009 at 12:00 AM
Advertisement
PHP Insert Value: In this tutorial you will get to know about how to insert values into a table, using both mysql console and phpmyadmin user interface. Images will guide you through necessary steps to insert values into a table.

Insertion of data into table:

We will study in this tutorial how to insert data into a table using MySQL console and phpMyAdmin. After creating table we need to insert values into respective fields. To describe or to know the design of a table do as follows:

i) Open the console of MySQL, and type desc table_name, output will be as follows:

Type:

desc student;

Field will show every field's name, Type will show the datatype of every field, Null and Key are constraints (which will be discussed later), Default will show whether we have set any default value earlier,

Type:

insert into student values ('name', 21, 'emp_id');

Now to insert values into table:

 

ii)    Using WAMP server, following screenshots will help you to learn how to insert into values into a table:

First of all we need to select a database , 

then open a specific table, after that do as follows:

After selecting a database you will get a page like the following, to insert values into a table, click on any of the icon, whose field is being marked.

Next page will be displayed like this, insert values in the boxes, (you can leave the function text boxes), click go button and the values will be inserted in the table. 

Note: To know about creation of table and database in phpMyAdmin and MySQL console please visit our webpages: http://roseindia.net/tutorial/php/phpdatabase/PHP-Create-Table.html & http://roseindia.net/tutorial/php/phpdatabase/PHP-Create-Database.html

Advertisement

Related Tags for PHP Insert Value:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 2, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com