我有我的表模型,並希望做一個使用模型,而不是一個表的連接。 例如,而不是:Zend加入模式
$select = $this->select()
->from(array('p' => 'products'),
array('product_id', 'product_name'))
->join(array('l' => 'line_items'),
'p.product_id = l.product_id',
->limit(20, 10);
,我指定表名,我想加入欄,我不能用我的模型?
$select = $this->select()
->from(array('p' => 'products'),
array('product_id', 'product_name'))
->join(array('l' => Model_Table1::tableName()),
'p.product_id = l.product_id',
->limit(20, 10);
作爲一個止損,我創建了其他模型的實例並根據需要獲取行。 – 2010-07-21 10:55:03