Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mohammednehru's avatar

MySql 8 Query to Query builder

Is there any way to convert this query to a query builder?

Because this returns an array.

    SELECT 
        ref,
        type,
        question,
        answers_array
    FROM 
        filled_forms, 
        JSON_TABLE(
          answers, 
          '$[*]' COLUMNS (
            `ref` int(11) PATH '$.ref', 
            `type` text PATH '$.type', 
            `question` text PATH '$.question',
            `answers_array` json PATH '$.answers'
          )
        ) result
    where 
        result.type = 'SELECT' AND form_report_id = 1")
0 likes
2 replies

Please or to participate in this conversation.