Hoe zit dit??
SELECT
GROUP_CONCAT(if(colHeader = 'Header 1', value, NULL)) AS 'Header 1',
GROUP_CONCAT(if(colHeader = 'Header 2', value, NULL)) AS 'Header 2',
GROUP_CONCAT(if(colHeader = 'Header 3', value, NULL)) AS 'Header 3'
FROM myTable;
Demo
Let op, je hebt GROUP BY
. nodig statement wanneer er meer gegevens van id's zijn zoals hieronder getoond in Demo 2 .