title: Adding Data with Yii Framework
body: <p>This is my user table structure :</p>
  
  <pre><code>+----------------+------------------+------+-----+---------+----------------+
  | Field          | Type             | Null | Key | Default | Extra          |
  +----------------+------------------+------+-----+---------+----------------+
  | ID             | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
  | screen_name    | varchar(20)      | NO   | UNI | NULL    |                |
  | slug           | varchar(20)      | NO   |     | NULL    |                |
  | email          | varchar(50)      | NO   | UNI | NULL    |                |
  | pass           | varchar(32)      | YES  |     | NULL    |                |
  | signin_twitter | enum('T','F')    | NO   |     | F       |                |
  | twitter_id     | int(11)          | YES  | UNI | NULL    |                |
  | bg_image       | varchar(50)      | YES  |     | NULL    |                |
  +----------------+------------------+------+-----+---------+----------------+
  </code></pre>
  
  <p>I'm trying to add data to my database. (in my controller)</p>
  
  <pre><code>$model=new Users;
          //$this-&gt;performAjaxValidation($model);
          if(isset($_POST['Users']))
          {
                      //screen_name, email,pass comes from form. Also, we need to set **slug** and **singin_twitter**
                  $_POST['Users']['slug'] = $this-&gt;sanitize($_POST['Users']['screen_name']);
                  $_POST['Users']['signin_twitter'] = 'F';
              $model-&gt;attributes=$_POST['Users'];
              if($model-&gt;save())
                  $this-&gt;redirect('dash/index');                  
          }
  </code></pre>
  
  <p>But it's not saving data . <code>$model-&gt;save() returning FALSE</code> . How can i debug it ?</p>