Advertisement
dragonbe

Untitled

Nov 21st, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. class Application_Model_Albums extends Zend_Db_Table_Abstract
  4. {
  5.     protected $_name = 'albums';
  6.     protected $_primary = 'id';
  7.    
  8. }
  9.  
  10. class Application_Model_Album
  11. {
  12.  
  13.    
  14.     public function getAlbums()
  15.     {
  16.         $albums = new Application_Model_Albums();
  17.                 $albumList = $albums->fetchAll(
  18.             $albums->select()
  19.                      ->where('id > ?', 1)
  20.         );
  21.         return $albumList;
  22.     }
  23.  
  24. class AlbumsController extends Zend_Controller_Action
  25. {
  26.     public function testAction()
  27.         {
  28.         $albums = new Application_Model_Album();
  29.                 $this->view->results = $albums->getAlbums();
  30.     }
  31. }
  32.  
  33.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement