By wpanssi on
I would like to run mysql-queries from the data collected with Webform module.
There are 4 tables related to webform module.
Let's assume that I have made a form with one simple statement and select element, where user can select 'yes' or 'no'.
And let's say that 50 people submits the from. With what sql-query I could get the number of 'yes' answers? Could someone help me with the structure of sql-query?
I looked up the structure of the webform-tables but I can figure out the relations of the database..
Any help would be nice!
Comments
Use the webform functions
wpanssi,
Your best bet is to look at how the webform module does it. Off the top of my head here but some of information is stored as serialized values so you may not be able to get direct values easily. The webform report module may be a good place to look since it deals exclusively with outputting submitted data.
Hope that helps.
any luck
I need to know how to pull out the serialized data from the `webform_submitted_data` table as well, haven't found anything online, may have to build something.