troubleshooting Question

mysql query

Avatar of Steve Tinsley
Steve TinsleyFlag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft AccessMySQL ServerSQL
11 Comments1 Solution414 ViewsLast Modified:
I am trying to create a database to hold a voting system.
I am beginning to getting the database up and running simply but an struggling on the query.

The tables are like this:

QUESTIONS
questionID
question

QUESTIONOPTIONS
optionID
questionID
option
correct

QUESTIONSUBMISSION
submissionID
questionID
optionID



From this I want to create a query (or view) to show the entries, like below:

submissionID     question                option
       001              Colour of sky           Blue
       002              Colour of Sky           Red
       003              10 Plus 5                   15
       004              Colour of Sky           Blue
       006              10 Plus 5                   15
etc........

Eventually I will use php to create a graph for each questions.

If someone can help with the query it will get me started!

Many Thank

Steve
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros