Php 有没有办法修改数据表,比如过滤信息?

Php 有没有办法修改数据表,比如过滤信息?,php,datatable,datatables,doctrine,symfony-2.8,Php,Datatable,Datatables,Doctrine,Symfony 2.8,实际上,我有一个html.twig文件,其中包含下一个数据表: -------------------------------------- 审计|领域 -------------------------------------- 1 |区域1 2 |区域13 |区域14 |区域1 5 |区域26 |区域27 |区域28 |区域2 -------------------------------------- 但我想做的是以这种方式显示数据表: -------------------------

实际上,我有一个html.twig文件,其中包含下一个数据表:

--------------------------------------
审计|领域
--------------------------------------
1 |区域1
2 |区域1
3 |区域1
4 |区域1
5 |区域2
6 |区域2
7 |区域2
8 |区域2
--------------------------------------

但我想做的是以这种方式显示数据表:
--------------------------------------
审计|领域
--------------------------------------
1、2、3、4|区域1
5、6、7、8|区域2
--------------------------------------

这是我在控制器中获取信息的方式:

$em = $this->getDoctrine()->getEntityManager();

        $auditsByAuditor = $em->getRepository('FSABundle:FsaAudits')
                            ->findBy(array('idAuditor'=>$auditor->getId()));


        return $this->render('FSABundle:FsaAudits:FsaPlan.html.twig', array(
            'currentPlan' => $currentPlan,
            'auditsByAuditor' => $auditsByAuditor
        ));
这就是我如何拥有html.twig:

<div class="table-responsive">
                <br/>
                {% for message in app.session.flashbag().get('status') %}
                    <div class="alert alert-success">{{message}}</div>
                    {%endfor%}
                    <table aria-describedby="dataTable_info" cellspacing="0" class="table table-hover dataTable" id="dataTable" role="grid" style="width:100%;" width="100%">
                        <thead>
                            <tr>
                                <th>Auditorias</th>
                                <th>Areas</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for audit in auditsByAuditor %}
                                <tr>
                                    <td>{{ audit.idAudit }}</td>
                                    <td>{{ audit.idArea}}</td>
                                </tr>
                            {% endfor %}
                        </tbody>
                    </table>
                </div>


{app.session.flashbag().get('status')%%中的消息的% {{message}} {%endfor%} 礼堂 地区 {auditsByAuditor%中的审核的%s} {{audit.idAudit} {{audit.idArea}} {%endfor%}


关于如何进行审计有什么想法或建议吗?

GROUP\u CONCAT
按审计分组和
GROUP by
区域我不知道你将如何做,但是
选择GROUP\u CONCAT(审计)审计,表中的区域按区域分组应该可以做到这一点。看看你是如何用你的语法来映射这个查询的。你需要对某个特定领域的审计进行分组审查。对不起,如何将其与条令一起使用?