Joins within Zend_db_table
I'm currenlt trying to do something like this:
Model - products.php
-----------------------------------------------------------------------------------------
class products extends Zend_Db_Table {}
$products = new products();
$db = Zend::registry('db');
$select = $db->select();
$select->from('products', '*');
$select->joinLeft('productFormat', 'productFormat.id = products.productFormatId', '*');
return $products->fetchAll($select);
------------------------------------------------------------------------------------------
products table has a FK named: productFormatId
productFormat table has an id PK
I need to find out how to use and extend zend_db_table so that I can still use the $products->fetchAll() within the controller but it will return the joined table.
I'm currently using thye V.7 framework
using what I've got currently - I receive the following error message:
Warning: PDO::quote() expects parameter 1 to be string
|