title: Getting results from 2 tables in Zend
body: <p>I have 2 database tables,</p>
  
  <pre><code>1. gallery -&gt; id, title, description
  2. gallery_images -&gt; image_id, gallery_id, name, image_title, thumb_name, image_name
  </code></pre>
  
  <p>I am able to select the images for specific gallery_id, using my Admin_Model_GalleryImages and my result array looks like the following -</p>
  
  <pre><code>Array ( 
  [0] =&gt; Array ( 
            [image_id] =&gt; 1 
            [gallery_id] =&gt; 24 
            [image_title] =&gt; NICEIC.png 
            [thumb_name] =&gt; thumb_.6386527349.png 
            [image_name] =&gt; 6386527349.png ) 
  
  [1] =&gt; Array ( 
            [image_id] =&gt; 2 
            [gallery_id] =&gt; 24 
            [image_title] =&gt; gas_safe_logo_monoblack.png 
            [thumb_name] =&gt; thumb_2100528832.png 
            [image_name] =&gt; 2100528832.png )
  </code></pre>
  
  <p>Code in the Gallery Model :</p>
  
  <pre><code>require_once 'Zend/Db/Table/Abstract.php';
  require_once APPLICATION_PATH . '/modules/admin/models/Gallery.php';
  
  class Admin_Model_GalleryImages extends Zend_Db_Table_Abstract {
  
      protected $_name = 'gallery_images';
      protected $_referenceMap = array(
              'Gallery' =&gt; array(
              'columns'       =&gt; array('gallery_id'),
              'refTableClass' =&gt; 'Admin_Model_Gallery',
              'refColumns'    =&gt; array('id'),
              'onDelete'      =&gt; self::CASCADE,
              'onUpdate'      =&gt;self::RESTRICT
          )
      );
  
      public function getImages($id){
          $galleryImages = new self();
          $galleryRowset = $galleryImages-&gt;select();
          $galleryRowset-&gt;where('gallery_id='.$id);
          $images = $galleryImages-&gt;fetchAll($galleryRowset);
          return $images;
  </code></pre>
  
  <p>listimages action in controller :</p>
  
  <pre><code>public function listimagesAction(){
          $id = $this-&gt;_getParam('id');
  
  
          $currentImages = Admin_Model_GalleryImages::getImages($id);
          if ($currentImages-&gt;count() &gt; 0) {
              $this-&gt;view-&gt;galleryImages = $currentImages;
          } else {
              $this-&gt;view-&gt;galleriesImages = null;
          }
      }
  </code></pre>
  
  <p>But I want results from the 1st table along with the results from the 2nd table,  as follows :</p>
  
  <pre><code>Array ( 
      [0] =&gt; Array ( 
                [image_id] =&gt; 1 
                [gallery_id] =&gt; 24 
                [image_title] =&gt; NICEIC.png 
                [thumb_name] =&gt; thumb_.6386527349.png 
                [image_name] =&gt; 6386527349.png
                [id] =&gt; 24 
                [title] =&gt; Somename
                [description] =&gt; description )
  </code></pre>
  
  <p>I tried using <strong>findDependentRowset</strong> but couldn't get it working. Please let me know how I could achieve this. Any help is much appreciated.</p>