Zend PHP - fetchAll() problem
608007Mar 5 2008 — edited Jul 7 2009Hi,
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;
}