title: how to show values from 2 tables in yii dropdownlist
body: <p>I have tables named Equipment and Supply. Now, I am trying to create a dropdownlist to display articles from both these tables. </p>
  
  <p>Here is my form calling a function named getArticle(): </p>
  
  <pre><code>&lt;?php echo $form-&gt;dropDownList($model,'article', RefArticleEquipment::getArticle()); ?&gt;
  </code></pre>
  
  <p>Here's the getArticle function:</p>
  
  <pre><code>public static function getArticle(){
      $prov1 = RefSupply::model()-&gt;findAll();
      $prov2 = RefEquipment::model()-&gt;findAll();              
      $records=array_merge($prov1-&gt;data , $prov2-&gt;data);
  
      foreach($records as $model){
          $desc = $model-&gt;article_code;
          $id = $model-&gt;id;
          $options[$id]=$desc;
      }
      return $options;
  }
  </code></pre>
  
  <p>Unfortunately this code doesn't work. I hope someone has done this before. Thanks a lot and regards</p>