I have some problems with transpose row to columns.
Site based on Wordpress
DataBase: MariaDB
Pivot functionality: off (i guess)
I have a sql table in this format:
FIELD_NAME FIELD_VALUE
your-name Nazar
location Ukraine
your-email uubukraine@gmail.com
telephone 0992312167
your-browser OPERA
Can you tell me how to turn her into this?
Your-Name Location Your-Email telephone your-browser
Nazar Ukraine u@gmail.com 0992312167 opera
I tried this code but it doesn't work correctly.
SELECT
submit_time,
MAX(IF(field_name = 'your-name', field_value, NULL)) AS Requestor,
MAX(IF(field_name = 'your-email', field_value, NULL)) AS Email,
MAX(IF(field_name = 'location', field_value, NULL)) AS Company_Name,
MAX(IF(field_name = 'telephone', field_value, NULL)) AS Telephone,
FROM
wpv4_contactic_submits
GROUP BY
submit_time