title: access a data from model table in yii
body: <p>i have a database 'example_data'.In that database i have 3 table 'user' 'fetch' and 'pages'.</p>
  
  <p>in the _from of fetch class, i have to fetch of user name from the user table. it means when a user is created. the user have to create a 'fetch' page. In the creation form of 'fetch' page first it should be fetch the perticular user name ,which user is creating a 'fetch' page.</p>
  
  <p>here is the code of _form</p>
  
  <pre><code>&lt;div class="form"&gt;
  &lt;?php $form=$this-&gt;beginWidget('CActiveForm', array(
    'id'=&gt;'wireframes-form',
    'enableAjaxValidation'=&gt;false,
  )); ?&gt;
    &lt;?php echo Yii::app()-&gt;request-&gt;getUrl(); ?&gt;
    &lt;p class="note"&gt;Fields with &lt;span class="required"&gt;*&lt;/span&gt; are required.&lt;/p&gt;
    &lt;?php echo $form-&gt;errorSummary($model); ?&gt;
  
    &lt;div class="row"&gt;
      &lt;?php echo $form-&gt;labelEx($model,'user_id'); ?&gt;
      &lt;?php echo $form-&gt;textField($model,'user_id'); ?&gt;
      &lt;?php echo $form-&gt;error($model,'user_id'); ?&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>in that form how i can fetch the name of user.</p>