title: What is wrong with the statement,in Yii?
body: <p>I have a folowing code in my controller ,</p>
  
  <pre><code>   public function actionViewJob() {
  
          $user_id = Yii::app()-&gt;session['user_id'];
          /* For User Authentication */
          if (Yii::app()-&gt;user-&gt;getId() === null)
              $this-&gt;redirect(array('site/login'));
          /* For User Authentication */
  
           $model=ViewJob::model()-&gt;findAll(array('user_id'=&gt;Yii::app()-&gt;user-&gt;id));
          $params = array('model' =&gt; $model,
          );
  
          $this-&gt;render('viewjob', $params);
  </code></pre>
  
  <p>I am getting error /* Property "CDbCriteria.user_id" is not defined. */
  but when I am using findByAttrinute its working f9,but I not getting the result,i.e its not filtering data,pls help.</p>
  
  <p>view section :  </p>
  
  <pre><code>// not posting full code //
  
  
     &lt;?php
          $this-&gt;widget('zii.widgets.grid.CGridView', array(
              'dataProvider' =&gt;$model-&gt;search(),  
  
  'columns' =&gt; array(
              array(
                  'name' =&gt; 'title',
                  'type' =&gt; 'raw',
                  'value' =&gt; 'CHtml::encode($data-&gt;title)',
                  'htmlOptions' =&gt; array('style'=&gt;'width:90px;','class'=&gt;'zzz'),
                 // 'filter'=&gt;'false' /* for hiding filter boxes */
  
           ),?&gt;
  </code></pre>