Thanks for the reply Elemental, but that is not really what I was talking about. I have found a little more info, on the Wiki, but still need a little more direction.
I am not sure if I am doing this the right way, but here is where I am to this point.
In the /model/Asset.php as a test I created an additional class Assetinfo that extends Zend_Db_Table. In the constructor I am trying to create the select by:
PHP Code:
$select = $this->_db->select();
$select->from('asset', '*');
Then in the controller I have:
PHP Code:
$allAssetInfo = new Assetinfo();
$where = 'status <> 5';
$this->view->allInfo = $allAssetInfo->fetchAll($where);
I know this doesn't work, but don't know where to go next. Once I build the SELECT, how do I execute it? Do I use fetchAll in the Zend_Db_Table?
The objective is to execute a query like this:
Code:
SELECT *
FROM asset as a
LEFT JOIN categories as c ON c.id = a.categories_id
LEFT JOIN locations as l ON l.id = a.locations_id
WHERE a.id = $id
Then I can populate $this->view->allInfo in the controller with the result.
I could do this in many ways, but really want to keep everything portable and stay within the ZF.