Chapter 19. Database connection, abstraction, and configuration

19.1 Database abstraction 433
19.2 Decorating and adapting database resource objects 438
19.3 Making the database connection available 442
19.4 Summary 448

Databases are a major component of any programmer’s diet. PHP programmers eat databases for breakfast, not to mention lunch, dinner, and late-night snacks. With MySQL in particular (and more recently SimpleSQL), databases have been fast food for many years: easy to install, deploy, and use.

But as any health fanatic will tell you, frivolous eating is dangerous. The first risk we run when consuming food is indigestion. The digestive process is supposed to work painlessly, but sometimes it doesn’t. In programming, we call these ...

Get PHP in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.