PHP development basic tutorial: data statement operation types and connecting to the database

Data statement operation type

  • ##After learning the database installation, the most important thing is The most important thing is to learn SQL statements.

  • SQL is the core of operating the database, and it is also the sentence at the beginning of this chapter: MySQL for PHP programmers is to convert business into a table structure. Do a good job of adding, deleting, modifying, and checking in the business.

  • Structured Query Language (SQL), referred to as SQL, is a special-purpose programming language. It is a database query and programming language used for accessing data and querying. , update and manage relational database systems; it is also the extension for database script files.

  • SQL is the most important relational database operating language, and its influence has exceeded the database field and has been valued and adopted in other fields, such as data retrieval in the field of artificial intelligence.

  • SQL is a relational model database application language, developed by IBM in the 1970s for its relational database System R.

  • SQL is an American standard for database language adopted by the American National Standards Institute (ANSI) in October 1986. Subsequently, the International Organization for Standardization (ISO) promulgated the official international standard for SQL. In April 1989, ISO proposed the SQL89 standard with integrity characteristics, and in November 1992, the SQL92 standard was announced.

  • Although each database system is slightly different, they basically follow the SQL 92 standard. Or made some simple extensions and changes on SQL 92.

  • After you have learned the SQL syntax of MySQL, other SQL syntax will be indispensable for learning.

SQL statements can be divided into 3 categories according to their functional scope:

  • Data Definition Language (DDL, Data Definition Language) statements: Data definition statements are used to define different data segments, databases, tables, columns, indexes, etc. Commonly used statement keywords include create, drop, alter, etc.

  • Data Manipulation Language (DML, Data Manipulation Language) statements: Data manipulation statements, used to add, delete, update and query database records, and check the integrity of the data. Commonly used statement keywords mainly include insert, delete, update, select, etc.

  • Data Control Language (DCL, Data Control Language) statement: Data control statement, a statement used to control the direct permission and access levels of different data segments. These statements define the database, tables, fields, user access rights and security levels. The main statement keywords include grant, revoke, etc.


Connect to the database

phpMyAdmin is a MySQL database management tool based on PHP and structured in Web-Base mode on the website host, allowing administrators to use the Web interface to manage MySQL databases. This web interface can be a better way to input complex SQL syntax in a simple way, especially when it comes to importing and exporting large amounts of data. One of the greater advantages is that phpMyAdmin is executed on the web server like other PHP programs, but you can use the HTML pages generated by these programs anywhere, that is, to remotely manage the MySQL database, and easily create, modify, and delete Databases and data tables. You can also use phpMyAdmin to create commonly used PHP syntax to facilitate the correctness of SQL syntax required when writing web pages.

Connect to the database throughphpMyAdmin built into the integrated environment

Find phpMyAdmin

77.png

Click to enter

78.png

The username and password are root, click execute to enter

79.png


##This is a visual page for operating MySQL. Click on the SQL to enter the SQL statement and execute it. We will introduce other functions later

Continuing Learning
||
php.cn
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!