Skip to content

Instantly share code, notes, and snippets.

@PatrickLef
Created May 5, 2011 20:20
Show Gist options
  • Save PatrickLef/957836 to your computer and use it in GitHub Desktop.
Save PatrickLef/957836 to your computer and use it in GitHub Desktop.
AR vs Yii AR
$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