10 days to learn PHP on the third day

Source: Internet
Author: User
Tags command line insert learn php table name access database phpmyadmin
Learning objectives: 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 does not matter, you download a phpMyAdmin installation, after the establishment of 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 choose Chinese Simplified, and then on the left to create a new database here to fill out the name of the database, click to create.

Then, in the left Drop-down menu, select the database that you have created. 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 the number of fields (not enough or more does not matter, later can be added or default), according to the implementation.
Then you can start building the table.
The first column is the name of the field, and 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 automatically added ID? Just select the int type and select Auto_increment on the back of the extra.

After you set up the table, you can see the table you created on the left, and after you click, you can:
1) Press the structure on the right: view the modified table structure
2) Browse to the right: view the data in the table
3 Press the SQL on the right: run the SQL statement
4) Press Right insert: Insert a row record
5) to the right of the empty: delete all records in the table
6) Press the Delete on the right: delete the table

There is also a very important function is to import and export, when we have done 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 it is SQL Server can also connect remote server to import. So in my SQL you can export all the SQL statements, to the remote server phpMyAdmin, the database after the creation of SQL, sticky paste you just copied down all the generated SQL statements.

That's it for today. Database operations tomorrow.



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.