Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

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