PHP + MySQL tutorial (1): MYSQL introduction MySQL is the most popular open source database server.
What is MySQL?
MySQL is a type of database. The database defines the structure of storage information.
Some tables exist in the database. Similar to HTML tables, database tables contain rows, columns, and units.
The database is very useful for storing classified information. A company's database may have these tables: "Employees", "Products", "Customers", and "Orders ".
Database table
A database usually contains one or more tables. Each table has a name (such as "MERS" or "Orders "). Each table contains records (rows) with data ).
The following is an example of a table named "Persons:
LastName FirstName Address City
Hansen Ola Timoteivn 10 Sandnes
Svendson Tove Borgvn 23 Sandnes
Pettersen Kari Storgt 20 Stavanger
The table above contains three Records (each record is a person) and four columns (LastName, FirstName, Address, and City ).
Query
A query is a query or request.
Through MySQL, we can query specific information from the database and obtain the returned record set.
See the following query:
SELECT LastName FROM Persons the query above selects all the data in the LastName column of the Persons table and returns a record set similar to this:
LastName
Hansen
Svendson
Pettersen