having problems using Zend_Db_Table_Abstract::createRow()
- by Gootik
Hey,
I have built a model that extends Zend_Db_Table_Abstract and I can't figure out why I can't use createRow(); here is my code:
class Model_User extends Zend_Db_Table_Abstract
{
public function createUser()
{
$row = $this->createRow();
$row->name = 'test';
$row->save();
}
}
and in a controller I use:
$userModel = new Model_User();
$userModel->createUser();
which when run displays an error
An error occurred
Application error
here is my setup in application.ini
resources.db.adapter = "pdo_mysql"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "pass"
resources.db.params.dbname = "app_db"
resources.db.isDefaultTableAdapter = true
I am sure that my user/pass/dbname is correct.
I would appreciate it if you point me in the right direction.