Computer Programming web Web programming Tips



How to use phpMyAdmin: Part 2

By Sergey Skudaev


<<Part 1<<

Let us continue tutorial: How to use phpMyAdmin. Visit Part 1 if you missed it.

If no table created yet you can create one.Type table name and number of fields. Click Go button. Fields display for data entry

phpMyAdmin table structure

Enter fields names and attributes:

phpMyAdmin Fields names and attributes

Click Save button. Table created

phpMyAdmin Table created

Here you can edit table fields. Click a pencil icon and change a field name or an attribute. If you want to delete a field click X icon.

Click Insert link to insert data in the products table. Table fields display for data entry. Enter your values. Enter 0 in auto-increment field.

phpMyAdmin Insert record

Click Go button. Click Browse link. Inserted records display

phpMyAdmin Inserted records display

Click SQL link. SQL text area displays for SQL query.

phpMyAdmin SQL query

Edit query:

SELECT * FROM `products` WHERE product='laptop'

And press Go button. Found record displays.

phpMyAdmin Found record displays

Click Structure link. Table structure is displayed

phpMyAdmin:Table structure is displayed

If you want to add one more field click Go button next to Add new field label.

phpMyAdmin:Add new field

Enter field name, data type and other attributes The field will be added to the table. Since table has records you cannot add field in which Null is not allowed.

That is why you have to enter Null in the Null field. Click Save button. New field will be added to the table.

phpMyAdmin:Add new field

To back up table data click Export button. Scroll down to "File name template:" field.

phpMyAdmin:Back up

Enter table name, mark Save as file check box and click Go button Save dialog box displays:

phpMyAdmin Save dialog box

Click Save button

phpMyAdmin Save dialog box

Save products.sql file in the backup folder. Download complete Dialog box displays

phpMyAdmin Download complete

Click Open button to see how records are saved.

phpMyAdmin Records are saved

Products.sql file contains create table statement and insert query for each record. To restore data just copy insert query in phpMyAdmin SQL text area and click Go. The records will be inserted in the table.

I did not describe all features of phpMyAdmin, but I give you a starting point.The rest you can learn on you own.

My eBooks on Amazon.com

US    UK    BR    CA
US    UK    BR    CA
US   UK   BR   CA