I have built a customer survey for a client, just a SafeCracker form. They are wanting to have a simple stats page that shows some information about surveys that have been submitted.
An example: What percentage of respondents gave us a 5 rating?
This will tell me how many surveys have a 5 rating:
{exp:query sql="SELECT * FROM `exp_channel_data` WHERE `channel_id` = '14' AND `field_id_30` = '5'"}{if count == total_results}{total_results}{/if}{/exp:query}And this will tell me how many surveys have been taken:
{exp:stats channel="survey"}{total_entries}{/exp:stats}So I have the 2 numbers I need to do the math, I just can’t make it process right. I have tried the exp:math plugin on devot:ee but I can’t make it work, probably because of parse order.
Does anybody have an suggestions? Thanks!
Jonathan
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.