I need to pull the data that has been submitted into the DB via a form into a usable format (spreadsheet) for the registrar of an organization.
I am able to pull all records with a simple "SELECT * FROM `table` ORDER BY id", but that format isn't very usable for spreadsheet use. I posted in the SQL2EXCEL forum, but they couldn't help (cited that they didn't have BF installed and didn't know the table format - even though I posted screen shots...)
So here's what I'm hoping to achieve:
As we all know, the data for the forms is stored in table 'jos_facileforms_subrecords'. The columns in the DB are as follows: id, record, element, title, name, type and value.
Each record has multiple lines in the table - the number depends on your particular form and what you are capturing. For a simple example, I'll just use a portion of what is in my table.
id record element title name type value
5168 151 1611 First Name pl1_fname text Bob
5169 151 1612 Last Name pl1_lname text Smith
5170 151 1838 Birthday pl1_dob calendar 04-06-1999
5171 152 1611 First Name pl1_fname text Tommy
5172 152 1612 Last Name pl1_lname text Jones
5173 152 1838 Birthday pl1_dob calendar 05-01-1998
5174 153 1611 First Name pl1_fname text Robert
5175 153 1612 Last Name pl1_lname text Adams
5176 153 1838 Birthday pl1_dob calendar 02-12-1999
I want the data to come out in this format (with column headings as shown - taken from title field):
First Name Last Name Birthday
Bob Smith 04-06-1999
Tommy Jones 05-01-1998
Robert Adams 02-12-1999
My actual project will be more involved, but if I can get this much out of it, I'm confident that I can figure out the rest. I know this is probably really simple for someone who knows how to write SQL queries, but I'm struggling to grasp how to do this.