PHP complete se...LOGIN
PHP complete self-study manual
author:php.cn  update time:2022-04-15 13:53:54

Introduction to PHP MySQL



Through PHP, you can connect to and operate the database.

MySQL is the most popular open source database system used with PHP.

If you want to learn more about MySQL, you can check out this site's MySQL tutorial.


What is MySQL?

  • MySQL is a database system used on the web.

  • MySQL is a database system that runs on a server.

  • MySQL is ideal for both small and large applications.

  • MySQL is very fast, reliable, and easy to use.

  • MySQL supports standard SQL.

  • MySQL compiles on some platforms.

  • MySQL is free to download and use.

  • MySQL is developed, published, and supported by Oracle Corporation.

  • MySQL is named after company founder Monty Widenius's daughter: My.

Data in MySQL is stored in tables. A table is a collection of related data, consisting of columns and rows.

Databases are very useful when storing information in categories. A company's database might have the following tables:

  • Employees

  • Products

  • Customers

  • Orders


PHP + MySQL

  • The combination of PHP and MySQL is cross-platform. (You can develop on Windows and apply on Unix platforms.)


Query

A query is an inquiry or request.

Through MySQL, we can query the database for specific information and get the returned record set.

Please see the following query (using standard SQL):

mysql> set names utf8;
mysql> SELECT name FROM websites;
+---------------+
| name          |
+---------------+
| Google        |
| 淘宝        |
| php中文网  |
| 微博        |
| Facebook      |
| stackoverflow |
+---------------+
6 rows in set (0.00 sec)
statement set names utf8; is used to set the database encoding so that Chinese can be displayed normally .

The above query selects all the data in the "name" column in the "websites" table.

To learn more about SQL, visit our SQL Tutorial.


Download MySQL database

If your PHP server does not have a MySQL database, you can download MySQL from this website: http://www.mysql.com. (Free)


Facts About MySQL Database

One of the great features about MySQL is that it can be scaled down to support embedded database applications. Perhaps because of this, many people think that MySQL can only handle small and medium-sized systems.

In fact, MySQL is the de facto standard database for those websites that support huge data and traffic (such as Friendster, Yahoo, Google).

This address provides an overview of companies using MySQL: http://www.mysql.com/customers/.

Related video tutorial recommendations: "mysql tutorial"//m.sbmmt.com/course/list/51.html

php.cn