Hello All,
I am new to zend Framework. I was trying very simple example i.e. fetching records from DB. I was referring to "http://framework.zend.com/manual/en/learning.quickstart.create-model.html". I followed as per the documentation and when i run the application it showed me message "An error occurred
Application error".
When i investigated it i found when it execute $this->getDBTable()->fetchAll() line of fetchAll() method (of mapper class), its throwing the above example. When i Printed $this->getDBTable() it was having all DB connection information but it was not containing fetchAll method because of which its giving error.
I would also like to ask one more question. In the above pasted link it showed that in the application->model->guestbook file we need to put
class Application_Model_Guestbook
{
protected $_comment;
protected $_created;
protected $_email;
protected $_id;
public function __set($name, $value);
public function __get($name);
public function setComment($text);
public function getComment();
public function setEmail($email);
public function getEmail();
public function setCreated($ts);
public function getCreated();
public function setId($id);
public function getId();
}
class Application_Model_GuestbookMapper
{
public function save(Application_Model_Guestbook $guestbook);
public function find($id);
public function fetchAll();
}
if you notice it also has mapper class code in model guestbook file. I have not added mapper class in the model guestbook class
Please let me know where i missed and what could be the problem.
Regards
Ashinaidu

