Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Zend framework2 使用UNION从多个表中获取数据_Zend Framework2 - Fatal编程技术网

Zend framework2 使用UNION从多个表中获取数据

Zend framework2 使用UNION从多个表中获取数据,zend-framework2,Zend Framework2,如何将此查询转换为zend tablegateway格式。到目前为止,Zend2似乎没有提供任何联合支持 它现在有combine() 但这对这两个人不起作用: 两个以上的SELECT 命令 请发布表格架构。问题使用架构编辑。 ("SELECT * FROM ( select id, title, report_date, report_file, company, 'company' as report_type from rs_company_report union

如何将此查询转换为zend tablegateway格式。

到目前为止,Zend2似乎没有提供任何联合支持

它现在有combine()

但这对这两个人不起作用:

  • 两个以上的SELECT

  • 命令


请发布表格架构。问题使用架构编辑。
("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 ");