Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Zend PHP - fetchAll() problem

608007Mar 5 2008 — edited Jul 7 2009
Hi,

I'm using zend php with the fetchAll function. I've declared the table name and primary key but I get the following error.

Fatal error: Uncaught exception 'Zend_Db_Table_Exception' with message 'Primary key column(s) (id) are not columns in this table ()'

The primary key is compound key as it uses a sequence generated number during inserts.
Any help you be much welcome? Here is the code and class.


function indexAction()
{
$this->view->title = "Equipment";
$album = new Equipment();
$this->view->equipment = $equipment->fetchAll();
}

class Equipment extends Zend_Db_Table
{
protected $_name = 'equipment';
protected $_primary = array('id');
//protected $_schema = 'zzz';
//protected $_identity = 1;
//protected $_sequence = true;
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2009
Added on Mar 5 2008
2 comments
7,089 views