18 PDO
One interface for all databases: that's the promise of PDO. It gives you access to (almost) all databases with a standardized API.
Before we turn to the "main databases" for use with PHP, we will first show a general approach. There are various so-called abstraction classes for databases under PHP on the web. In principle, this is a very sensible approach: the individual modules for MySQL, SQLite, Microsoft SQL Server, Oracle, PostgreSQL, and others all behave similarly, but not in the same way. There are always small differences in the control—including, of course, different names. This is not a problem in itself. However, it becomes difficult when the database changes. When using a database-specific module, reprogramming is now largely ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access