title: Yii selecting only specified attributes in array
body: <p>I often face this problem..</p>
  
  <p>Lets say ..In blog application, I need to email all the active users..</p>
  
  <p>What I do is write findAll on users with some conditions of their last login being greater than some value..and get all the User objects...Then run a foreach through all the user model objects and store emails in a array, then use the array..</p>
  
  <p>I other words what is happening in back-end is I am loading whole model, while I only need barely<code>0.5%</code> of that information, and then running a dirty code to get values in in array, and then process with it..</p>
  
  <p>Isn't it quite bad in performance and dirty code..</p>
  
  <p>Now other approach I can think of is using <code>commandBuilder</code> and write query and then run same dirty code to get values in array..one problem of performance resolved..but as people say writing sql in mvc frameworks, is not a really good idea..</p>
  
  <p>What I really want...some similar functions which give me column values in array if it is a single column, or array with column name as index if multiple columns..</p>
  
  <p>So what I am thinkin of doing is implement it by extending ActiveRecord or something similar, <strong>what I want to check is if some one has already implemented something similar, or have some ideas for it..:)</strong></p>