How do you know it does not return anything. What does count($drawings)
equate to?

Do you receive any errors?

Are you sure you have your DB config set properly and have permissions to
the DB?

I am not familiar with Firebird, but you should be able to use Zend_Db to
make SQL queries directly to the database like so:

$drawingModel->getAdapter()->fetchAll('SELECT * FROM `DRAWINGS`');

If that doesn't return the values you expect then there is probably a
configuration problem with your DB.

Konr

On Fri, Aug 19, 2011 at 1:24 PM, Steve Rayner <[email protected]>wrote:

> What am I doing wrong here;
>
>
> $drawingModel = new Spares_Model_Drawings();
>
> $drawing = $drawingModel->find(2);
>
> This does not return any rows even though there is a row with a primary key
> of 2.
>
> This is my model;
>
> class Spares_Model_Drawings *extends *Zend_Db_Table_Abstract{
>
>    protected $_name = 'DRAWINGS';
>
>    protected $_primary = 'DRAWING_REF';
>
> }
>
> My database is Firebird. I am using Zend Framework 1.10.0
>

Reply via email to