Chapter 6. Database, Active Record, and Model Tricks
In this chapter we will cover the following topics:
Getting data from a database
Defining and using multiple DB connections
Using scopes to get models for different languages
Processing model fields with AR event-like methods
Applying markdown and HTML
Highlighting code with Yii
Automating timestamps
Setting up an author automatically
Implementing single table inheritance
Using CDbCriteria