Mar 17th, 2012, 10:31 AM
I have solved it myself. A custom SQL query seemed the quickest way. In case someone else wants to achieve the same thing, below is the query. Just replace:
- your table name in the database
- names of your columns
- values of radio buttons
p.
- your table name in the database
- names of your columns
- values of radio buttons
Code:
SELECT submission_id AS 'id',
CASE WHEN question_1 = '1' THEN 1 END AS 'green',
CASE WHEN question_1 = '2' THEN 1 END AS 'blue',
CASE WHEN question_1 = '3' THEN 1 END AS 'red',
CASE WHEN question_2 = '1' THEN 1 END AS 'yes',
CASE WHEN question_2 = '-1' THEN 1 END AS 'no',
CASE WHEN question_2 = '0' THEN 1 END AS 'sometimes'
FROM ft_form_1 WHERE 1
p.