Homerboy
Lifer
I'm trying to create some homebrew polls for my website (see DUFA in sig below).
However I've run into a problem in that I can not figure out a way to get ONLY the polls they have not voted in as of yet to display.
My tables are set up as follows:
poll_info: poll_id, timestamp, question
poll_questions: question_id, poll_id, answer
poll_responses: poll_id, answer_id, team_id
As a vote is cast the poll_responses adds a row adding which poll they voted in, what their answer was (based off question_id from the poll_questions table) and inserts their team id.
I can not come up with a working query though to only display the poll_id for those WHERE team_id != <current GM logged in>. I can use the != but then it displays a row for each vote that is not theres on that poll.
IE: If you have not voted in poll_id = 2, but 5 other GMs have, it will show that poll listed 5 times (as there are 5 rows with poll_id = 2 and NOT your team_id
I'm just having a painful mental block on this... driving me nuts. suggestions?
I will happily share whatever code you want to see.
However I've run into a problem in that I can not figure out a way to get ONLY the polls they have not voted in as of yet to display.
My tables are set up as follows:
poll_info: poll_id, timestamp, question
poll_questions: question_id, poll_id, answer
poll_responses: poll_id, answer_id, team_id
As a vote is cast the poll_responses adds a row adding which poll they voted in, what their answer was (based off question_id from the poll_questions table) and inserts their team id.
I can not come up with a working query though to only display the poll_id for those WHERE team_id != <current GM logged in>. I can use the != but then it displays a row for each vote that is not theres on that poll.
IE: If you have not voted in poll_id = 2, but 5 other GMs have, it will show that poll listed 5 times (as there are 5 rows with poll_id = 2 and NOT your team_id
I'm just having a painful mental block on this... driving me nuts. suggestions?
I will happily share whatever code you want to see.