A Comparison of PDO and MySQLi Methods


show more PDO and MySQLi compared provides you with in-depth training on Developer. Taught by David Powers as part of the Accessing Databases with Object-Oriented PHP show less
please wait ...

PDO and MySQLi compared

Throughout this course, I've deliberately avoided comparing PDO and MySQL improved, but now we've come to the end of our journey. Maybe this is an appropriate time to consider how they measure up against each other. PDO's main strength, is that the code is database neutral. You need to learn only one API to work with more than a dozen database systems. In theory, just change the DSN, and the same code works with a different database. All the scripts in chapters two, three and four, work seamlessly with SQL Lite and My SQL.

In practice, differences in SQL dialects make conversion more difficult. Also, some PDO drivers are still experimental. So, you need to check with the PHP documentation, to see how mature the driver for your chosen database system is. MySQL improves great strength, is that it's designed specifically to work with MySQL. A simple example's, the data_seek method and num_rows property, make working with MYSQL easier than using PDO.

It's also what MySQL recommends ...

PDO and MySQLi compared
Video duration: 3m 31s 3h 47m Intermediate

Viewers:

PDO and MySQLi compared provides you with in-depth training on Developer. Taught by David Powers as part of the Accessing Databases with Object-Oriented PHP

Subject:
Developer
Software:
PHP
Author:
please wait ...