Friday 17 September 2021

How to change or convert MySQL to MySQLi

 In PHP 7 or greater, the MySQL extension has been removed completely and so, it is important to convert or upgrade from MySQL to MySQLi to keep your website updated

One of the most important developments in the PHP world was the backward compatibility break for the PHP MySQL extension, which leaves us with two methods to connect to the database: MySQLi and PDO

I will discuss how to convert a MySQL extension into MySQLi. The first thing you should understand is that MySQL works as a resource whereas MySQLi works as a resource and an object. While you really do not need to know the technical differences, you must understand that these two are a lot different from each other.

The functions defined below uses the MySQLi Procedural and Object Oriented methods to convert all deprecated MySQL functions to MySQLi


No comments:

Post a Comment