3

webform query to export submitted data and timestamp question

http://drupal.org

I am unable to export webform submitted results probably because of timeout or memory issue.

I tried to run the below query, exported 8MB of data.

SELECT s.sid, s.submitted, cp.form_key, sd.data
FROM webform_submissions s
LEFT JOIN webform_submitted_data sd ON sd.sid = s.sid
LEFT JOIN webform_component cp ON (sd.cid = cp.cid and cp.nid=169)
WHERE sd.nid = 169
ORDER BY s.sid ASC, cp.cid ASC, no ASC

Making provided functionality work is probably difficult given the amount of data I have. So, I am looking for better solution to export the data to excel.

I have two issues with the above query:
1) Results are not in tabular format. it has submission id, column name, data per row. each submission has 10 rows(that many fields I have). Is there any way to convert each submission as one row with columns as fields?

2) I don't have submission date in any of the fields. How do I get the submission date? I thought s.submitted is the date, but it is of number data type.

Appreciate your help! Thanks,

Read »
Created by fourkitchens 33 weeks 4 days ago
Category: Tutorials   Tags:

PSD to Drupal Theme

Drupal Development

Module Development

Get an Estimate

Tags for webform query to export submitted data and timestamp question

Recent comments