Ordinary mysql connections will definitely be abandoned because the problem of sql injection must be prevented every time and it is relatively slow
mysqli is an optimization based on ordinary mysql. To be honest, it is very successful in preprocessing. This method completely solves the problem of sql injection
But the only disadvantage is that it only supports mysql database. Of course, if you do not operate other databases or of course this is undoubtedly the best choice
PDO is the latest one. The connection method is compatible with most databases and solves SQL injection, but it also has shortcomings. It only supports versions above php5. However, I heard that only this kind of connection will be supported in php6 in the future.
PDO unifies all database abstraction layer object interfaces, mysqli It only unifies mysql
To put it simply, PDO can implement the same code to operate different databases. For example, if you migrate from mysql to mssql, the program basically does not need to be changed
And mysqli simply understands the encapsulation of mysql. Good
Under high load conditions, PDO can obtain a relatively stable load "value" by enabling long connections. But the efficiency is not the highest.
mysql is the fastest. mysqli comes second. It’s just that mysql and mysqli are used when there is high concurrency and high system load. The load it carries is also considerable. PDO does not.