Our local club has about 15 Board members, and we vote online using a mySQL/php web interface. I have several different queries/results that I print which show varying displays of motions/votes/tallies and so on. NOW our Board wants to not only see the summary listing for all motions, but also include a list of each Board member who DIDN'T vote on any motion. I've tried various joins, COUNT, etc. but so far I haven't been able to add the names of non-voting Board members to the summary list. Here are the three tables that track this data:
TABLE 1 - BOARDINFO
Name
Board Member
(plus more fields with more detail about each Board Member)
PRIMARY KEY is Position/Year/Name
TABLE 2 - MOTIONS
MotionID
Result
(plus more fields that have text of each motion, dates, proposers, etc.)
PRIMARY KEY is MotionID
TABLE 3 - VOTES
MotionID
BoardMember
Vote (enum YES, NO, ABSTAIN, etc.)
PRIMARY KEY is MotionID/BoardMember
Currently my code produces a webpage with this info:
-------------------------------------------
The PEOPLE'S CHOICE CLUB
Board Motions Summary
Vote
20070826-45-E - VP - Mary Molloy - Carried
20070825-44-E - Maximum length of Events - Carried
20070825-42-E - Events dedications - Carried
20070807-41-E - Approve printing of Policy Manual - Carried
20070806-40-E - Events for 2008 - Carried
20070806-39-E - Use phone for soliciting memberships - Carried
20070730-38-E - Change to Ballot format - Carried
20070723-38-E - Buy new tape recorder - Carried
20070722-37-E - Pay for photos of Board members for publication - Lacked Majority
20070715-36-E - Publish photos of Board members - Carried
etc.
-----------------------------------------------------------------
What I'm also trying to achieve is the addition of the following (or something similar):
MOTION ID DIDN'T VOTE
20070826-45-E - VP - Mary Molloy - Carried
Didn't Vote: John Doe
Jane Smith
Tim Tam
20070825-44-E - Maximum length of Events - Carried
Didn't Vote: Mike Walsh
Ed Baker
20070825-42-E - Events dedications - Carried
Didn't Vote: John Doe
Ed Baker
etc.
Once I get the code to properly select the non-voters, I can work on the php to do the web display, but right now I'm stumped.
I look forward to a KISS solution :-)
Thanks!