I'm trying to move more code from my controllers to my models. For an insert
action I'm doing this:
class Toestellen extends Zend_Db_Table_Abstract {
(...)
public function addItem()
{
$data = array(
'naam' => $this->_formData['naam'],
'nummer' => $this->_formData['nummer'],
'speelplein_id' => $this->_speelplein,
'created_dt' => date('Y-m-d H:i:s'),
'type' => $this->_type
);
$this->insert($data);
return $this->getLastInsertId();
}
(...)
}
However I get this error: Fatal error: Call to a member function
describeTable() on a non-object in
/Users/bytte/Sites/speelokee-test/library/Zend/Db/Table/Abstract.php on line
696
Do you know what's wrong?
--
View this message in context:
http://www.nabble.com/Fatal-error-while-trying-to-insert-to-db.-tp20917866p20917866.html
Sent from the Zend Framework mailing list archive at Nabble.com.