title: What is wrong with this yii statement.?
body: <p>I have the following codes in my contoller which retrives all the data from the table...Its working fine when I use find instead of findAll... using findAll its showing  error 'array to string conversion'.Is there any other way to write the query..</p>
  
  <p>// Posting the full contoller Code//</p>
  
  <pre><code>    public function actionSearch()
      {
           $model = new SearchEmployee();
  
             /*Getting Data From Search Form For Processing */
            if (isset($_POST['SearchEmployee'])) {
  
            $category   =  $_POST['SearchEmployee']['category_id'];
            $skills     =  $_POST['SearchEmployee']['skills'];
            $experience =  $_POST['SearchEmployee']['experience'];
  
           $model = SearchEmployee::model()-&gt;findAll("category_id=:category AND
               key_skills like :skill AND experience=:experience", array(
                   'category'=&gt;$category,
                   'skill'=&gt;'%'.$skills.'%',
                   'experience'=&gt;$experience
               ));
            //var_dump($model);  
           $this-&gt;render('search', array('model' =&gt; $model));
         }
  }
  </code></pre>
  
  <p>//view:search.php:This is my view section it is  being used for searching and displaying the results  //</p>
  
  <h1>Search Employees</h1>
  
  <pre><code>&lt;p class="note"&gt;Fields with &lt;span class="required"&gt;*&lt;/span&gt; are required.&lt;/p&gt; 
  
     &lt;div class="row"&gt;
       &lt;?php echo $form-&gt;labelEx($model,'Category');   ?&gt;
       &lt;?php echo $form-&gt;dropDownList($model,'category_id',$list,array('empty' =&gt;'(Select a Category')); ?&gt;
       &lt;?php echo $form-&gt;error($model,'category'); ?&gt;
  &lt;/div&gt;
  
      &lt;div class="row"&gt;
   &lt;?php echo $form-&gt;labelEx($model,'Experience'); ?&gt;
        &lt;?php echo $form-&gt;textField($model,'experience'); ?&gt;
        &lt;?php echo $form-&gt;error($model,'experience'); ?&gt;  
  &lt;/div&gt;
  
      &lt;div class="row"&gt;
    &lt;?php echo $form-&gt;labelEx($model,'Skills'); ?&gt;
        &lt;?php echo $form-&gt;textField($model,'skills'); ?&gt;
        &lt;?php echo $form-&gt;error($model,'skills'); ?&gt;
  &lt;/div&gt;
  
  &lt;div class="row buttons"&gt;
      &lt;?php echo CHtml::submitButton('Search'); ?&gt;
  &lt;/div&gt;
  
  
  
   &lt;div class="view"&gt;
  
     &lt;h1&gt;Results &lt;/h1&gt;
  
   &lt;div class="view" id="id"&gt;
  
     &lt;h4&gt;Name :      &lt;?php echo $model -&gt;name;    ?&gt;&lt;/h4&gt;
     &lt;h4&gt;Skills:     &lt;?php echo $model -&gt;key_skills; ?&gt;&lt;/h4&gt;
     &lt;h4&gt;Category:   &lt;?php echo $model -&gt;category; ?&gt;&lt;/h4&gt; 
     &lt;h4&gt;Experience: &lt;?php echo $model -&gt;experience; ?&gt;&amp;nbsp;Years&lt;/h4&gt;  
     &lt;h5&gt;&amp;nbsp;&amp;nbsp;&lt;?php echo CHtml::submitButton('VIew Details'); ?&gt; &lt;/h5&gt;
     &lt;/div&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>Is there any other way to write the query...Its still working as have used var_dumb to see the result.</p>