Created
April 14, 2014 10:16
-
-
Save akanehara/10635054 to your computer and use it in GitHub Desktop.
Yii AR - derived property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Foo extends CActiveRecord | |
| { | |
| $public $derived; | |
| public function beforeFind() | |
| { | |
| $this->dbCriteria->select = 'col1, col2, col3, deriving(col2) AS derived'; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment