0

I've found out that when I extends Zend_Db_Table_Abstract in my model I get

An Error Ocurred

Aplication error

When I run this code

<?php

class Admin_Model_News
{
    protected $_name = 'news';
    protected $_primary = 'new_id';

    public function addNews($data) {
        $this->insert($data);
    }
}

It works properly, but when I run

<?php

class Admin_Model_News extends Zend_Db_Table_Abstract
{
    protected $_name = 'news';
    protected $_primary = 'new_id';

    public function addNews($data) {
        $this->insert($data);
    }
}

It messes up What could be wrong? You can check some of my files here

tereško
  • 58,060
  • 25
  • 98
  • 150
Rodrigo Souza
  • 7,162
  • 12
  • 41
  • 72

1 Answers1

1

Wrap the insert in a try catch block:

try{
    $this->insert($data);
} catch (Exception $e){
    echo $e->__toString();
}

This will give you a more detailed error message then application error. AND PLEASE comment here if it doesnt work dont post a new question AGAIN.

Iznogood
  • 12,447
  • 3
  • 26
  • 44