I\'m inserting a new row into my database with this code:
$data = array( \'key\' => \'value\' ); $this->getDbTable()->insert($data);
One gotcha. When calling $this->getDbTable()->insert($data); you have to make sure $data include the "primary key" of your table. For example, id=null if it's auto-increment. Otherwise, insert() will not return the last inserted ID.
$this->getDbTable()->insert($data);
id=null
insert()