www.webdeveloper.com
Results 1 to 3 of 3

Thread: Donations VS Votes

  1. #1
    Join Date
    Jul 2006
    Posts
    655

    Donations VS Votes

    Hi, my site allows donators (members) to make donations to charity competitions. The donators can also vote in a poll for each charity competition.

    When a user makes a donation to a charity competition, they also have the right to submit one vote.

    QUESTION
    I want to change the system, so that the donators can make as many donations as they like to a charity competition but still only have one vote.

    My current database looks like this:

    id
    charity_comp_id
    member_id
    donation_amount
    vote_status (submitted / not submitted)
    vote_answer

    How should i setting this up so that users can submit as many donation as they like per competition but they are still only limited to one vote? Thanks in advance for your help...

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,334
    Maybe separate votes and donations into 2 different tables?
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,125
    Couldn't you just allow entries to be added when they donate. The vote_status field could populate with something like "Already voted" and the vote_answer could be null?
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles