Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- --------- ----------
- | Books | | Author |
- --------- ----------
- | id | --->| id |
- | name | | | name |
- | a_id |---- | |
- --------- ----------
- */
- //Model_Books.php
- public function fetchAll()
- {
- $select = $this->select()->setIntegrityCheck(false);
- $select->from($this->_name, array(/.. your columns from books/))
- ->joinInner('books', 'condition', array('your columns'); //or you can use $this->_referenceMap
- return parent::fetchAll($select);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement