PHP and MySQL related extensions are: MySQL, mysqli and PDO three kinds
MySQL extension is deprecated from php5.5.0 and is abolished starting from php7.0.0
MySQL used before---several basic functions: mysql_connect (); Mysql_close (); mysql_create_db (); Mysql_db_query (); mysql_drop_db ();
Querying the database from the Web:
A user's browser makes an HTTP request, requesting a specific Web page, which is to be processed within PHP (for example, results.php) by touching the published form. Web server
After the Web server receives a request to the results.php page, it retrieves the file and passes it to the PHP engine for processing
The PHP engine starts parsing the script. The script mainly includes the command to connect to the database and execute the query. PHP initiates a connection to the MySQL server and sends the appropriate query to the server.
The MySQL server receives a request for a database query, starts processing the query, and returns the query results to the PHP engine.
After the PHP engine has finished running the script, return the HTML to the Web server.
The Web server then returns HTML to the client browser, and the user can see the resulting page after the response.
How PHP works with MySQL