Zend db mysqli or PDO_MYSQL adapter

I saw some code examples that do this in application.ini

resources.db.adapter = mysqli or resources.db.adapter = PDO_MYSQL 

What is the difference between the two? Does this affect my code? When should I choose one or the other?

+4
source share
2 answers

I have developed many Zend_Db components for the Zend Framework through release 1.0. The goal was that the adapters function the same or as close to it as possible, which can be supported by the PHP extension.

The same set of unit tests can be run on both MySQL adapters, with little or no difference. Of course, there is no noticeable difference.

The reason you chose one of them, and the only reason we supported Mysqli in general, and not just PDO_MySQL, is because you need to deploy a PHP environment where you do not have a PDO extension and you do not have rights to change of environment. For example, a product placement environment.

+10
source

When you deploy your application to a web server (shared hosting) using CPANEL,

  • Make sure PDO is enabled with phpinfo(); . If enabled, you can use resources.db.adapter = PDO_MYSQL
  • If PDO is not enabled, you need to go with an alternative, resources.db.adapter = mysqli .
+2
source

All Articles