PHP MySql Introduction

PHP MySQL tutorial will explain you What is MySQL and what is Query? with ExamplesMySQL is a popular open source database management system that is commonly used in PHP-based web applications.

What is MySql?

MySQL is a database system used on the web. Basically, a MySQL database allows you to create a relational database structure on a web-server somewhere in order to store data or automate procedures.

PHP acts as your queries (among other things), and your forms are basically web pages with fields in them. With all of this combined, you can create truly spectacular projects on the web. If you think of it in comparison to Microsoft Access, MySQL is what holds all of your data in database objects called tables.

Database Table

A table is a set of values that is organized using a model of vertical columns and horizontal rows. A table consists of records, and each record is made up of a number of fields.

Example of Database table:

first_name last_name
Paul Pitterson
Francine Beecham
Raul DiNozzo

What is Query?

A database query is a piece of code (a query) that is sent to a database in order to get information back from the database. Query is used as the way of retrieving the information from database.

A database “query” is basically a “question” that you ask the database. The result of the query is the information that is returned by the database management system.

Queries are usually constructed using SQL (structured query language) which resembles a high-level programming language.

Suppose we had a table called “employees” with the following data:

first_name last_name
Paul Pitterson
Francine Beecham
Raul DiNozzo

Simple query for select:

Result of above query will be:

Previous articlePHP Reference
Next articlePHP MySql Connect to a database
I am a young Information Systems Security Engineer(CEH). I had started with penetration testing when i am 17 years old. It all started with Kali linux and Metasploit.In free time i will play with Security holes/Bug bounty/Pentesting and Hacking !!!