0
私はDPTableインターフェイスの中にセカンダリテーブルを追加する必要があります。どのように可能ですか? hosted_plansテーブルを用いて上記のコードlist_plan機能IN複数の表のインターフェイスを混ぜる
class Application_Model_DbTable_PlanList extends Zend_Db_Table_Abstract
{
protected $_name = 'hosted_plans';
public function list_plan()
{
$row = $this->fetchAll();
if (!$row)
{
throw new Exception("Could not find row $id");
}
return $row->toArray();
}
public function list_plan_features()
{
$table = new HostedPlanContentMapping();
$select = $table->select();
$select->from($table);
$row = $table->fetchAll($select);
if(!$row)
{
throw new Exception("Could not find result");
}
return $row->toArray();
}
}
:次のコードで、例えば
。 HostedPlanContentMappingから詳細を取得するために、この同じクラスに別の関数を追加する必要があります。私はlist_plan_features()でしようとしました。下記のようなコントローラーを呼び出してください:
$featurelist = new Application_Model_DbTable_PlanList();
$this->view->listfeature = $featurelist->list_plan_features();
しかし結果が得られません。
誰でも私を助けることができますか?