0
select union in zf2 query代碼正在使用聯合使用三個表,但我需要聯合超過五(5)個表......幫助我解決此問題。在zf2查詢中選擇多於五個表使用聯合
$dbAdapter = $this->adapter;
$sql = new Sql($dbAdapter);
$select1 = $sql->select();
$select1->from('java');
$select2 = $sql->select();
$select2->from('dotnet');
//union of two first selects
$select1->combine ($select2);
$select3 = $sql->select();
$select3->from('android');
$select4 = $sql->select();
$select4->from('network');
$select5 = $sql->select();
$select5->from('dmining');
$select3->combine ($select4);
//Final select
$select = $sql->select();
$select->from(array('sel1and2' => $select1, 'sel3and4' => $select3));
$sQuery = $select->combine ($select5);
你還沒有提到你面臨的問題究竟是什麼。什麼是錯誤信息? – 2014-09-01 14:23:22
錯誤不顯示在瀏覽器中,也出現在錯誤日誌中......問題是,沒有從表中獲取行 – baladpi 2014-09-02 04:41:01