Looking for a better way to count the responses to the survey questions

Hello all - I have created a survey for a site and now want to display the results to the admins of the site. I am trying to display the countdown - the number of times that a question has been answered in a certain way. I realize that I may need to build the investigation itself differently and how it stores data, but here is how it goes far.

There are 10 questions, each with 4 options of radio button groups. The database table contains a column for each issue and stores the value of the selected option button. So it's pretty simple.

Now on the results page, that it's the only way I can think to do, but there must be a better way. For each answer, I create a Recordset filtered on the issue and the value option, then display the total number of records. Which works great, but count each option, which means that 40 recordsets on the page - al simply determine "how many times was the Question 1, Option was selected and how many times has the Question 1, selected Option B and so on.»

The only other thing I can think it maybe is a better way to count the occurrences of these values in the table is with PHP or in the SQL itself.  Or, perhaps, if the values themselves are entirely digital and follow a kind of model I can use a solution of math.

Thoughts, solutions, and ideas are welcome!  Thank you.


Your problem is a bad design. You should have a separate line for each answer, not to separate the columns. It also makes the very rigid investigation. A simple design would include a few tables - a master of the investigation that stores the questions and response table that contains a foreign key to the question number in the master, the answer, as well as any other details you need to capture. You might get more elaborate, but it's essential. Your result page and then just be a single recordset with a simple query with a group by clause.

I urge you to review this before going any further.

Tags: Dreamweaver

Similar Questions

  • looking for a better way to add many groups of


    I'm new to G language and I find it quite difficult to figure out how to deal with table in labview. I am creating the over $ 15 consine functions (discrete) each with different frequencies. I use the loop and consine function to generate the table for each COS, but to add each other (adding the element by element), I have to use a loop again? I'm really curious to know if there is another way to generate the sum of all these cosine at a time and convert the result into a single table. Someone suggested using the form and loop for, but I don't understand how to use the form and how to make the result?

    You can create and add in the same iteration using a registry to offset.

    Here's a quick demo, adding five functions sinus with different numbers of cycles. You should be able to adapt it to your problem.

  • Looking for a better way to write this SQL

    Oracle version 11R2
    Version of the OS (any)

    What I try to do is write a query that finds Public synonyms without a target object. I came up with this, but I think there is a better way.
      s.owner, s.synonym_name, s.table_name, s.table_owner, s.db_link, InitCap(o.object_type) object_type
      sys.DBA_SYNONYMS s, sys.DBA_OBJECTS o
      s.synonym_name is not null
      s.table_owner = o.owner (+)
      s.table_name = o.object_name (+)
      s.owner = 'PUBLIC'
      object_type is null;  
    object_type is null appears to be weak. It seems that the target object must be better.

    Your comments, observations, questions welcome.

    I don't know exactly what 'better' means in this context (faster, easier to read, etc.), but I tend to use a NOT EXISTS

    SELECT s.*
      FROM dba_synonyms s
     WHERE owner = 'PUBLIC'
       AND s.db_link IS NULL
        SELECT 1
          FROM dba_objects o
         WHERE o.owner = s.table_owner
           AND o.object_name = s.table_name )

    I added the criteria DB_LINK to filter the public synonyms referring to objects in remote databases that obviously do not exist in the local DBA_OBJECTS.


  • Is there a better way to remove the toolbar "Frequently used tools" (which I've never used!) to open whenever I open Acrobat reader. rather than uninstall Acrobat and use another PDF reader?

    Is there a better way to eliminate the "frequently used tools.
    toolbar (which I've never used!) to open whenever I open Acrobat
    drive. rather than uninstall Acrobat and use another PDF reader?

    Hi jg49392310,

    You can disable the tool pane with Adobe Acrobat Reader DC was last updated, see this note cover hide the tools Panel in Acrobat and Acrobat Reader DC at all times.

    Kind regards


  • Is there a better way to make the selection on this slider?

    Is there a better way to make the selection on this slider?
    I need to retrieve the test scores max (tesc_code SO1, S02, S03 etc... etc...)
    I get the results presented here, but I wonder if it's a better way to do this.
    The results should be back in the same cursor... e
    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    SELECT   s01.sortest_pidm       pidm_s01,
             s01.sortest_tesc_code  tesc_code_s01,
             s01.sortest_test_score score_s01,
             s02.sortest_pidm       pidm_s02,
             s02.sortest_tesc_code  tesc_code_s02,
             s02.sortest_test_score score_s02,
             s07.sortest_pidm       pidm_s07,
             s07.sortest_tesc_code  tesc_code_s07,
             s07.sortest_test_score score_s07,
             s08.sortest_pidm        pidm_s08,
             s08.sortest_tesc_code   tesc_code_s08,
             s08.sortest_test_score score_s08,
             s09.sortest_pidm        pidm_s09,
             s09.sortest_tesc_code   tesc_code_s09,
             s09.sortest_test_score  score_s09
      FROM   saturn.sortest s01,
             saturn.sortest s02,
             saturn.sortest s07,
             saturn.sortest s08,
             saturn.sortest s09
     WHERE       s01.sortest_tesc_code IN ('S01')
             AND s01.sortest_pidm = p_pidm
             AND s01.sortest_term_code_entry = p_term
             AND s01.sortest_test_score =
                   (SELECT   MAX (s01a.sortest_test_score)
                      FROM   saturn.sortest s01a
                     WHERE   S01.sortest_pidm = s01a.sortest_pidm
                             AND S01A.sortest_tesc_code IN ('S01'))
             AND s02.sortest_tesc_code IN ('S02')
             AND s02.sortest_pidm = p_pidm
             AND s02.sortest_term_code_entry = p_term
             AND s02.sortest_test_score =
                   (SELECT   MAX (S02A.sortest_test_score)
                      FROM   saturn.sortest s02a
                     WHERE   S02.sortest_pidm = s02a.sortest_pidm
                             AND S02A.sortest_tesc_code IN ('S02'))
             AND s07.sortest_tesc_code IN ('S07')
             AND s07.sortest_pidm = p_pidm 
             AND s07.sortest_term_code_entry = p_term
             AND s07.sortest_test_score =
                   (SELECT   MAX (S07A.sortest_test_score)
                      FROM   saturn.sortest S07A
                     WHERE   S07.sortest_pidm = S07A.sortest_pidm
                             AND S07A.sortest_tesc_code IN ('S07'))
             AND S08.sortest_tesc_code IN ('S08')
             AND S08.sortest_pidm = p_pidm 
             AND S08.sortest_term_code_entry = p_term
             AND S08.sortest_test_score =
                   (SELECT   MAX (S08A.sortest_test_score)
                      FROM   saturn.sortest S08A
                     WHERE   S08.sortest_pidm = S08A.sortest_pidm
                             AND S08A.sortest_tesc_code IN ('S08'))
                     AND S09.sortest_tesc_code IN ('S09')
             AND S09.sortest_pidm = p_pidm 
             AND S09.sortest_term_code_entry = p_term
             AND S09.sortest_test_score =
                   (SELECT   MAX (S09A.sortest_test_score)
                      FROM   saturn.sortest S09A
                     WHERE   S09.sortest_pidm = S09A.sortest_pidm
                             AND S09A.sortest_tesc_code IN ('S09'));


    The problem is that you to act as a Cartesian product with all the tables (you will get: S01 * S02 * S08 * S09 lines!) Is it really what you want?
    I don't think...

    Wharton, you can do (with no Cartesian product) is:

    CURSOR c_sortest_SAT_scores(p_pidm IN saturn.sortest.sortest_pidm%TYPE,
    p_term in saradap.saradap_term_code_entry%TYPE)
    SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
           sortest_test_score score
      FROM sortest
     WHERE (sortest_tesc_code, sortest_test_score) IN (
              SELECT   sortest_tesc_code, MAX (sortest_test_score)
                  FROM sortest
                 WHERE sortest_tesc_code IN ('S01', 'S02', 'S07', 'S08', 'S09')
                   AND sortest_pidm = :p_pidm
                   AND sortest_term_code_entry = :p_term
              GROUP BY sortest_tesc_code)
       AND sortest_pidm = :p_pidm
       AND sortest_term_code_entry = :p_term

    However you absolutely need a Cartesian product, you can do:

    WITH allrows AS
         (SELECT sortest_pidm pidm, sortest_tesc_code tesc_code,
                 sortest_test_score score
            FROM sortest
           WHERE (sortest_tesc_code, sortest_test_score) IN (
                    SELECT   sortest_tesc_code, MAX (sortest_test_score)
                        FROM sortest
                       WHERE sortest_tesc_code IN
                                              ('S01', 'S02', 'S07', 'S08', 'S09')
                         AND sortest_pidm = :p_pidm
                         AND sortest_term_code_entry = :p_term
                    GROUP BY sortest_tesc_code)
             AND sortest_pidm = :p_pidm
             AND sortest_term_code_entry = :p_term)
    SELECT s01.pidm pidm_s01, s01.tesc_code tesc_code_s01, s01.score score_s01,
           s02.pidm pidm_s02, s02.tesc_code tesc_code_s02, s02.score score_s02,
           s07.pidm pidm_s07, s07.tesc_code tesc_code_s07, s07.score score_s07,
           s08.pidm pidm_s08, s08.tesc_code tesc_code_s08, s08.score score_s08,
           s09.pidm pidm_s09, s09.tesc_code tesc_code_s09, s09.score score_s09
      FROM allrows s01, allrows s02, allrows s07, allrows s08, allrows s09
     WHERE s01.tesc_code = 'S01'
       AND s02.tesc_code = 'S02'
       AND s07.tesc_code = 'S07'
       AND s08.tesc_code = 'S08'
       AND s09.tesc_code = 'S09'

    The lines will be stored in memory to a temporary table before that product happen (should be faster)...

  • I am looking for a SIMPLE way to add my robots.txt file

    I read up on this subject. But I wasn't able to do it again.

    I found this:

    1. re: file robots.txt for sites of the Muse

    Vinayak_GuptaEmployee Hosts

    You can follow the guidelines of Google to create a robots.txt file and place it in the root of your remote site.


    Thank you



    Once you create a robots.txt like this:

    user-agent: ia_archive

    Disallow: /.

    (1) where do you put 'head labels? Do you need them?

    I would insert it in muse that looks like this

    < head >

    user-agent: ia_archive

    Disallow: /.

    < / head >

    or just put it anywhere inside the 'head' tag

    (2) put the robots.txt file in a folder?

    I've heard this, but it just doesn't seem right.

    (3) OK you have the

    -Properties Page


    -HTML < head >

    Can I copy and paste my right robot.txt info in there? I don't think I can and make it work. According to the info I found (that I posted above), the robots.txt 'file' you 'place at the root of your remote site.

    (4) where is the 'root of my remote sit?

    How can I find that?

    I read other people having problems with this.

    I thank very you much for any help.


    I need Terry White to make a video on it LOL

    Maybe I'll ask.

    I thought about it.

    However, with the help of Godaddy, the file was not placed between theand, so I'm still a little nervous.

    It is recommended to:


    1.  re: file robots.txt for sites of the Muse


       Vinayak_Gupta   , April 19, 2014 01:54 (in response to chuckstefen)

    You can follow the guidelines of Google to create a robots.txt file and place it in the root of your remote site.


    Thank you



    Place the robots.txt file to the root "of your remote site.

    and that (Godaddy) is not between the

    I checked the robot file that I created here

    New syntax Robots.txt Checker: a validator for robots.txt files

    and other than me not to capitalize

    the 'u' in the user-agent, it seems to work. When my site is analyzed, she does not miss a robots.txt file

    user-agent: ia_archive

    Disallow: /.

    Problem solved, unless I find an easy way to place the robots.txt file placed between the head tags (and better).

    I'll keep my ears open, but don't worry too much on this subject.

    Step 1) write the code of robots that you want to

    Step 2) save the file as a txt

    Step 3) contact your Web hosting provider / upload in the root of the Web site in a single file

    Step 4) check with a robot's checker that I listed above

    What was shake me:

    -where to put

    -the difference between files and folders, it seemed I would be to load a file for some reason any.

    -I was expecting something like the list of the news LOL

  • A better way to treat the form as a table with the variable column type?

    I wanted to make a column to return according to the status of a flag column as readonly. I have a column defined as follows in the report query.


    To get the SRM process noting that column, I had to put this 'band of HTML code' to 'No', then the column attributes, I put:
    "Expression HTML" to "#TYPE_CODE #
    ' Display under "to"text display (saves the State).

    And then it took me to get new lines of work:
    "Default of Type" to "Expression of PL/SQL.

    This makes large, however submit that it seems that the checksum of line used by MRU included the raw HTML generated by the APEX_ITEM package and not just the value of the column. I worked around this by including an element hidden checksum and creating a process that replaces the checksum generated automatically with my custom.

    Is there a better way to intercept this checksum, preferably before it is rendered on the page? I now hide the sum of hidden HTML control in the output HTML of another column, so it's a bit ugly. If not, is there an easier way to achieve what I'm looking for? I tried several combinations, and it seems to work better. It's just a shame there's no way to have a standard hidden column included in the SRM process.


    I tried different possibilities and seems to run the following:

    Create a report questioning in NORMAL SQL function to help:

    END SAL,

    Do not specify something special for column definitions.

    Create a button that submits the page.

    Create a PL/SQL process that runs "On submit - after calculations" and Validations, triggered by this button and using the following code:


    I've done here: http://htmldb.oracle.com/pls/otn/f?p=55041:35

    Any element with the value of DEPTNO 10 has the value SAL, read-only, as otherwise it's editable. This is done by creating a hidden input field for the actual value, followed by the text version OR by creating a single entry field. This ensures that we have the correct number of SAL elements on the page.

    APEX_ITEM. MULTI_ROW_UPDATE is the "manual" version of the MRU that you would normally get with a form of table and works for above normal as sql based query reports. The format of this very strict is that you must always allow for two primary keys. See the text of presentation here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b32258/api.htm#CHDFDACC


  • Presario SR5152NX: Looking for AMD Motherboar d update of the BIOS for Presario SR5152NX

    I got the BIOS file for the update. However, the installation does not work on Windows 10. He is looking for Vista. Is there a way to delete the image file, so I can update BACK?

    Install the last 5,14 BIOS on the motherboard will not give you the necessary UEFI settings used with the WIndows operating system beyond 7 (ie 8 and 10).  That's what I think, it was your intended purpose.

  • Is there a better way to generate the custom timed digital signals

    I'm trying to generate the digital output from the top and down with delays on different lines. Each daq assistant is activate single line on a port USB 6501. There more complex high and lows that I need to generate variable time difference between high and low. There is codebelow that does what I'm trying to achieve, but for a model executing high and low signal is much of your time to do it this way. I'm sure there is a better way to do it, I'm not an expert on labview so I only discovered its potential. Anyone can suggest a more effective and a quick way to do it. I would like to hgihly appreciate. Thank you!

    I've not shown in the code below, but using the DAQ assistant, I initialized lines at low logic level.

  • I'm looking for a software that can track the use of the software. No spyware, I just want to know if the investments are indeed worth

    Invest US heavily in certain types of software (by request) but have little or no in order to see if it is actually used after purchase.  I'm looking for a way to track 'time-used '.

    Hi schellekensr,

    Unfortunately, there are no Microsoft software to help you accomplish what you want.

    However, you can search online by using your favorite search engine and see if there are any 3 Group software that can help you accomplish the same thing.


    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope the helps of information.

  • Simple way to count the elapsed time from one slide to another

    Hi, I know that there are some positions and materials thereon one but... I can't get right.

    I've read a lot of things and did that an expert in this field - Lilybiri - proposed in it several articles on this subject.

    In fact, what I'm looking for is something extremely simple. I use captivate 7. I have a project with 15 slides. The first 5 are with instructions on the competition (we don't bother them for the timer). The last 10 are with the assignment itself. What I need is to count time spent on slide 6-15 drag. Tried the clock widget – it does not stop at slide 15 + his eyes cannot be customized. Also tried shares advanced and cpInfoElapsed variable - apparently I'm not good to understand. The idea is to be able to say to the learner - you spent XX time to accomplish this task.

    Would really appreciate a helping hand please.


    Thanks in advance


    Normally this blog post: display of time - Captivate blog information should provide you with all the information you need. Some system variables have got another name: System variables in Captivate 6 - Captivate blog

    You may also need to store the time at the end of the 15 slide in a user variable, so that you can calculate and display in a text container.

  • A better way to rearrange the sort in Pivot mode?

    First question - is there a better way to do it?

    Background - have a simple pivot w / requirements to the Status column so that logic to not alphabetical company.
    Example, # Service req with status should be listed as affected, accepted, completed, closed, re-assigned.

    My solution has been to create a column iin table view, use a CASE to say one time statement accepted = 1, etc.. I then sorted CSA, hidden column in a table view and then rotate view I added the status column and hid the new CASE column. I get the results that I expected, but I was wondering if there was a better way to do it?

    Thanks - years

    As far as the presentation layer is concernd (i.e., in the responses) your way is the best I can think of. The only way you can sort a list of values outside the way that the system can determine automatically (for example, in alphabetical, chronological, order numerically, etc.) is to create your own definition. Without human intervention or custom rules, there is no way any system know that 'C' must come before the "S" (as in "Assigned" and "Accepted" or "O" should come before the 'L' as in 'Complete' and 'Closed').

    Because the system knows how to order numbers (e.g., 1,2,3, etc.), it makes sense to create your 'rule' (using your CASE statement) to assign each level of the State to 'correct' number in the sequence.

    That's what I'd do. The only addition I can add is that you can do to the RPD by adding a column 'command' to your table LOVs and expose that as a column in the presentation layer. Then you can use this column in sort order.

  • Look for files of application appearing on the site

    I was wondering if there is a fix for this - some files for applications are showing up in the search results for the BC site.

    Example: http://foodforestfarm.BusinessCatalyst.com/search

    Type "instructions".

    How I can we disable the app of Site Search directory?

    This is Alpha/Beta stuff, BC are aware of this and Apps will be hidden in such things before the official release of the.

  • Design for MU - Exchange centralized, distributed to the unit question

    Here's the situation. Please let me know if I'm understanding correctly.

    Two centers of data, Europe and CONUS, centralized Exchange servers to support remote offices. Most remote sites in Europe have the average response time ~ 150ms, but AsiaPac is on the order of ~ 300ms.

    Each remote office would get a manager calls and a local system of the unit. The unity system would be storing voicemail in case of failure of the connection to the data center, give language-specific greetings, etc..

    If the link between the office and the data center is in place, then the machine of the unit will then send computers virtual to the Exchange Server, which would then put the virtual computer in box mailbox users.

    If the link does not work, it will store voicemails. Users will always be able to get new VM messages since they will be on their box of the local unit.

    Users will be able to listen to the old VM messages if they are configured to download e-mail on their local machine since at this time, it's just another email.

    I've been through the design guide and want to ensure that I understand that this is not a recommended solution? None of the offices have a local Exchange Server. The latency is going to be a deal breaker for a deployment of UNIFIED messaging?

    It would certainly not be a supported configuration. The unit must me on the same LAN as the server Exchange, MS, GC. Communication between Exchange and the unit is very sensitive to time and cannot tolerate delays or package loses all. Just me that you plan now flat will not work.

    So in this model, you will need to have the unit in the data center or choose a VM solution. With the servers in the data center, they would register in CM over the WAN, but you would need QoS are configured for voice traffic. But in the case where the Wan came down people would not be able to get to voicemail.

    The other option would be for you to have the CM and the unit in the data center and use SRST at remote sites:


    I know have enough details to know if it will work for you, but you can check it out.

    Thank you


  • Looking for a better style or a way to write the INSERT statement, possible with brand of continuation

    Honestly, I really looked everywhere for this.

    The problem is that, while tinkering in SQL Developer and knowing that in the spreadsheet I can just execute individual instructions by placing the cursor on the SQL statement I want to run I tried to do an INSERT query that would allow me to run an INSERT statement for... Well many inserts.

    I thought I could use a brand of continuation but nothing I've tried has worked.




    ("Blackthorn", "tonic water", 1.5, 1.0, "pineapple juice", "mix with ice").

    ("Blue Moon", "soda", 1.5 "Blueberry Juice",. 75, "mix with ice, strain")


    I ended up doing just individual INSERT statements, which was not as convenient.

    INSERT INTO HF_easy_drinks

    VALUES ('Blackthorn', 'tonic water', 1.5, 1.0, "pineapple juice", "mix with ice");

    INSERT INTO HF_easy_drinks

    VALUES ('Blue Moon', 'soda', 1.5, 'Blueberry Juice',. 75, "mix with ice");


    Perhaps you might prefer "an" insert like this:

    INSERT INTO hf_easy_drinks (x, y, z,...)
    SELECT "Blackthorn", "tonic water", 1.5, 1.0, "pineapple juice", "mix with ice" OF THE double
    UNION ALL SELECT 'Blue Moon', 'soda', 1.5, 'Blueberry Juice',. 75, "mix with ice, strain ' FROM dual
    SELECT UNION ALL... OF the double
    SELECT UNION ALL... OF the double

    Best regards

    Bruno Vroman.

Maybe you are looking for

  • How to remove last updated? Too many changes that does not work for me.

    Update eliminates options quick toolbar or right-click capabilities for my search engine chosen; Twitter, Wikipedia, etc. These options are VERY important to my usage of Firefox.

  • Firefox crashing on the iPad and MacBook Air

    Since the release of OS X 11, Firefox has been crashing, locking up and opening of several copies of the software. Everyone knows this? MacBook Air, OS X Lion mountains (10.8.3), processor 2.0 GB, 8 GB of RAM

  • Satellite L630/037 pregnant too soft

    Hello I bought a Toshiba L630/037 a few days earlier and concluded that the speaker sound is too soft.I uninstalled audio driver preloaded and updated with the Microsoft audio driver, but that has not helped. I have the speaker volume, left and right

  • How do Photon calendar app stop mailing me I have no events

    Basically, that's all. I don't want you receive email (to my gmail account) I have no events on a particular date. How to stop the calendar of Photon app to do this?

  • Question about security updates

    For several days my phone asked me to install some updates before shutting down.  I did the 12 times he asked him, ignorantly assuming they were different upgrades.  Finally, I went to Windows Update to find the problem, and what are the updates that