Created
May 5, 2011 20:20
-
-
Save PatrickLef/957836 to your computer and use it in GitHub Desktop.
AR vs Yii AR
This file contains 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
$post=new Post; | |
$post->title='sample post'; | |
$post->content='post body content'; | |
$post->save(); | |
VS | |
Post.new(:title => 'sample post', :content => 'post body content').save | |
--- | |
$post=Post::model()->find($condition,$params); | |
VS | |
Post.where(:condition => params).all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment