Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Application_Model_Albums extends Zend_Db_Table_Abstract
- {
- protected $_name = 'albums';
- protected $_primary = 'id';
- }
- class Application_Model_Album
- {
- public function getAlbums()
- {
- $albums = new Application_Model_Albums();
- $albumList = $albums->fetchAll(
- $albums->select()
- ->where('id > ?', 1)
- );
- return $albumList;
- }
- class AlbumsController extends Zend_Controller_Action
- {
- public function testAction()
- {
- $albums = new Application_Model_Album();
- $this->view->results = $albums->getAlbums();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement