0

I have a table that look like this:

'formname', 'row_id', 'field_name', 'field_value'
'testMYSQL','21','field1','value1'
'testMYSQL','21','field2','value2'
'testMYSQL','21','field3','value3'
'testMYSQL','22','field1','value1_1'
'testMYSQL','22','field2','value2_2'
'testMYSQL','22','field3','value3_3'

I want to output a dynamic output where the field_name are the columns and there is one row for each row_id. This should be dynamic because the number of fields can grow.

Example output:

formname | row_id | field1   | field2     | field3
testMysql| 21     | value 1  | value2   | value
testMysql| 22     | value 1_1| value2_2 | value3_3
Kerby82
  • 4,725
  • 14
  • 45
  • 70

0 Answers0