Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
qiang.xue committed Nov 5, 2008
1 parent a961023 commit 639c1f7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/guide/database.ar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ and save them back to the database table.

~~~
[php]
$post=Post::model()->findByPk(10); // assuming there is a post whose ID is
10
$post=Post::model()->findByPk(10);
$post->title='new post title';
$post->save(); // save the change to database
~~~
Expand Down Expand Up @@ -456,14 +455,14 @@ after validation is performed.
- [beforeSave|CActiveRecord::beforeSave] and
[afterSave|CActiveRecord::afterSave]: these are invoked before and after
saving an AR instance.

- [beforeDelete|CActiveRecord::beforeDelete] and
[afterDelete|CActiveRecord::afterDelete]: these are invoked before and
after an AR instance is deleted.

- [afterConstruct|CActiveRecord::afterConstruct]: this is invoked for
every AR instance created using the `new` operator.

- [afterFind|CActiveRecord::afterFind]: this is invoked for every AR
instance created as a result of query.

Expand Down

0 comments on commit 639c1f7

Please sign in to comment.