2013-04-10 50 views
1
("SELECT * FROM (
    select id, title, report_date, report_file, company, 'company' as report_type from rs_company_report 
    union 
    select id, title, report_date, report_file, company, 'sector' as report_type from rs_sector_report 
    union 
    select id, title, report_date, report_file, company, 'morning' as report_type from rs_morning_report) as company_reports where company LIKE '%1%' order by title "); 

如何將此查詢轉換爲zend tablegateway格式。使用UNION從多個表中提取數據

+0

請發表表架構。 – Raptor 2013-04-10 07:56:31

+0

用模式編輯的問題。 – 2013-04-10 08:19:25

回答

0

它現在擁有合併()

但它並不適用於這兩種工作:

  • 兩個以上的SELECT的

  • ORDER

相關問題