title: How to Retrieve Image Files from Database Using Yii Framework?
body: <p>Our Yii Framework application has the following defined as part of the UserProfileImages model:</p>
  
  <pre><code>public function getProfileImages($param, $user_id) {
          if(isset($param['select']) &amp;&amp; $param['select']=='all'){
              $profile_images = UserProfileImages::model()-&gt;findAllByAttributes( array( 'user_id'=&gt;$user_id) );
  
          } else {
              $profile_images = UserProfileImages::model()-&gt;findByAttributes( array( 'user_id'=&gt;$user_id) );
          }
          return $profile_images;
      }
  </code></pre>
  
  <p>How would I wire up the above snippet to a widget in my view to return all the images for a given user?<br>
  Bonus Question:  Which image rotator do you suggest to render the above?</p>