我有这个查询
SELECT qu.nom_questao, qu.tipo_reposta ,rq.des_resposta
FROM questao qu
inner join questionario_questao qq on qu.id_questao=qq.id_questao
inner join questionario q on qq.id_questionario = q.id_questionario
left join resposta_questao rq on qu.id_questao=rq.id_questao
WHERE q.id_questionario=1
和result of this select 我希望该列按nom_questao分组显示,结果类似
[
0:[TesteFechada
[0:opcao1
1:opcao2
2:opcao3
3:opcao4
]
],
1:[TesteAberta
[
0:opcao1
1:opcao2
2:opcao3
3:opcao4
]
],
3:[Range[
0:21
1:35
]
]
PDO有什么方法可以做到这一点?