10 days to learn PHP the third day in Guangdong Entertainment

Source: Internet
Author: User
Tags learn php phpmyadmin

Learning Purpose: Learn to build a database

In ASP, if you are an Access database you can directly open access to edit the MDB file, if it is SQL Server you can open Enterprise Manager to edit the SQL Server database, but in PHP, MY SQL command-line editing may make beginners feel very troublesome, It doesn't matter, you download a phpmyadmin to install, and later build the editing database can rely on it.

Let's talk about its use.

After entering the phpMyAdmin, we first need to set up a database,

Language (*) Here Select Chinese Simplified, and then on the left to create a new database here fill in the database name, click Create.

Then select the database that you have created in the left drop-down menu. In the following

Create a new table in the database shop:

Name:

Number of fields:

Fill in the table name and roughly what you think of the number of fields (not enough or more of it does not matter, can be added later or default), press to execute.

Then you can start building the table.

The first column is the name of the field; the second column selects the field type:

The following are some of our common uses:

1) VARCHAR, text type

2) INT, integer type

3) Float, floating-point type

4) Date, type

5) You may ask, where is the ID that is automatically added? just select the int type, and select Auto_increment in the extras below.

After you have established the table, you can see the table you created on the left, and after clicking, you can:

1) Press the structure on the right: View Modify table Structure

2) Browse by right: View the data in the table

3) Press the right SQL: Run SQL statement

4) Press Insert on right: Insert a row of records

5) on the right, clear: Delete all records in the table

6) Press DELETE on the right: Delete table

There is a very important function is import and export, when we have the program and database, we need to have a local mirror on the server, if the ASP access is simple, upload the MDB file directly, if SQL Server can also connect to the remote server for import. So in my SQL you can export all the SQL statements, to the remote server phpMyAdmin, after the database is created, press SQL, paste all the SQL statements you just copied down.

Today, we'll talk about database operations tomorrow.

10 days to learn PHP the third day in Guangdong Entertainment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.