Explore BrainMass

Poll on a Web Page

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Please provide the code for the data storage file for the attached poll.
Helpful suggestions are below:

Create the database/Setup database tables
Identify a Primary Key
Store the questions results each time a response is submitted.
Use INSERT statements to populate the table
Issue SELECT SQL statement(s) that request all the possible answers for the poll.
Use a WHILE loop to extract info from the MySQL result set
Use the MySQL function COUNT() to count the number of records in the table
Display the number of votes the chosen answer received.

© BrainMass Inc. brainmass.com October 24, 2018, 8:39 pm ad1c9bdddf


Solution Preview

I used 3 tables. 1 table to store the possible colors, 1 table to store the possible seasons, and another to store the votes. There are an additional two attributes in that table, the sex and the marital status.

I chose to store each vote that comes in. This way we have the maximum ...

Solution Summary

The expert provides the code for the data storage file for the attached poll. INSERT statements to populate the tables are determined.

See Also This Related BrainMass Solution

Opinion Polling Webpage

2. Visit the Opinion Poll webpage ( http://en.wikipedia.org/wiki/Opinion_poll) and examine a variety of polls.
3. In the Forecasting discussion forum, discussion the following:
a. What are your views regarding economic forecasting? In particular, share any experiences you may have had with business forecasts for company budgets.
b. Discuss some of the important criticisms of the forecasting.

View Full Posting Details