I have a mysql database with the following structure.
id|form_id|element_label|element_value|group_id|date|ip
This is generated from a form plugin in joomla so I have no control over its structure.
The form id is the form the value is related to, element_label is the input that it relates to, element_value is the value that the user enetered and group_id is the id of the new entry.
The group_id is a common value in all rows related to the users input.
Of an example when a user fills out a simple form for contact it is populated in the database like this:
1|15|1|Some Persons Name|12|12-11-2014|10.0.0.3
2|15|2|[email protected]|12|12-11-2014|10.0.0.3
3|15|3|The users message|12|12-11-2014|10.0.0.3
It is important to note that the form_id is common between all rows and group_id is only assigned to a single users form submission.
I want to now pull this data out from MySQL and place it in a standard HTML table with standard PHP.
I want is to look like.
group_id|Some Persons Name|[email protected]|The users message|date
I have tried to use GROUP BY in the query but it didn't work.
Please can some one advise on how I could approach a solution to this issue.
Thanks in advance.