O'Reilly logo

PHP in Action: Objects, Design, Agility by Chris Shiflett, Marcus Baker, Dagfinn Reiersol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required