title: Unknown Error in Yii Framework
body: <p>I have this code in my Yii Music Store Application, but I didn't know the error(s). My idea is to show/browse the category/criteria of album, artist, and genre. But it always show "the else condition". I have tried to fix it but I can't find the error(s). The code is below. Hope anyone can fix it. Thanks all</p>
  
  <pre><code>&lt;?php
  
  class StoreController extends Controller
  {
  public $message;
  
  public function actionIndex()
  {
      $this-&gt;message = "Hello from Store.Index()";
      $this-&gt;render('index', array('content'=&gt;$this-&gt;message));
  }
  
  public function actionBrowse()
  {
      if(isset($_GET["gid"])){
          $gid = $_GET["gid"];
  
          $genreCriteria = new CDbCriteria();
          $genreCriteria-&gt;select = "`GenreId`, `Name`, `Description`";
          $genreCriteria-&gt;condition = "genreId = " . $_GET["gid"];
  
          $artistCriteria = new CDbCriteria();
          $artistCriteria-&gt;alias = "t1";
          $artistCriteria-&gt;select = "DISTINCT `t1`.`Name`, `t1`.`ArtistId`";
          $artistCriteria-&gt;join = "LEFT JOIN `tbl_album` ON `tbl_album`.`ArtistId` = `t1` . `ArtistId`";
          $artistCriteria-&gt;order = "`t1`.`ArtistId` ASC";
  
          $albumCriteria = new CDbCriteria();
          $albumCriteria-&gt;alias = "t2";
          $albumCriteria-&gt;select = "`AlbumId`, `GenreId`, `Title`, `Price`, `AlbumArtUrl`";
          $albumCriteria-&gt;condition = "`GenreId` = " . $_GET["gid"];
          $albumCriteria-&gt;order = "`ArtistId` ASC";
  
          $this-&gt;render('index', array('Albums' =&gt; Album::model()-&gt;findAll($albumCriteria),
                                       'Artist' =&gt; Artist::model()-&gt;findAll($artistCriteria),
                                       'Genre' =&gt; Genre::model()-&gt;findAll($artistCriteria)));
      }else{
          $this-&gt;message = "Hello from Store.Browse()";
          $this-&gt;render('index', array('content'=&gt;$this-&gt;message));
      }
  }
  
  public function actionDetails()
  {
      $this-&gt;message = "Hello from Store.Details()";
      $this-&gt;render('index', array('content'=&gt;$this-&gt;message));
  }
  
  // Uncomment the following methods and override them if needed
  /*
  public function filters()
  {
      // return the filter configuration for this controller, e.g.:
      return array(
          'inlineFilterName',
          array(
              'class'=&gt;'path.to.FilterClass',
              'propertyName'=&gt;'propertyValue',
          ),
      );
  }
  
  public function actions()
  {
      // return external action classes, e.g.:
      return array(
          'action1'=&gt;'path.to.ActionClass',
          'action2'=&gt;array(
              'class'=&gt;'path.to.AnotherActionClass',
              'propertyName'=&gt;'propertyValue',
          ),
      );
  }
  */
  }
  </code></pre>