title: query dynamic number of fields
body: <p>I have a table that look like this:</p>
  <pre><code>'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'
  
  </code></pre>
  <p>I want to output a dynamic output where the <code>field_name</code> are the columns and there is one row for each <code>row_id</code>. This should be dynamic because the number of fields can grow.</p>
  <p>Example output:</p>
  <pre><code>formname | row_id | field1   | field2     | field3
  testMysql| 21     | value 1  | value2   | value
  testMysql| 22     | value 1_1| value2_2 | value3_3
  </code></pre>