O'Reilly logo

CodeIgniter 1.7 by David Upton, Jose Argudo

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

Active Record

Active Record is a "design pattern"—another of those highly abstract systems like MVC, which provide templates for solving common coding problems. In itself, it isn't code, it is just a pattern for code. There are several different interpretations of it. At its core is the creation of a relationship between your database and an object, every time you write a query. Typically, each table is a class (represented by our models), and each single row becomes an object. All the things you might want to do with a table row, for example, create it, read it, update it, or delete it, become "methods", which that object inherits from its class. CakePHP is built around the Active Record pattern, and so is CI—although the exact implementation ...

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