There are many PHP functions which works in MySQL to execute queries. PHP & MySQL has became most popular web scripting language in internet today because of these functions and flexibility of PHP program. There are many popular scripts for forums, content management, classified programs, e-commerce sites etc runs in PHP scripts by using MySQL database. To manage these scripts we use these PHP functions.
It is recommended by PHP.NET to use PDO_MySQL or MySQLI extensions. The old MySQL extension was deprecated in PHP 5.5.0 and was removed in PHP 7