0

I have this query

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

and result of this select i want that group by column nom_questao having a result like

[
    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
    ]
]

is there any way the PDO can do this?

Nigel Ren
  • 56,122
  • 11
  • 43
  • 55

0 Answers0