Is it possible to do this..?

Discussion in 'Programming' started by taktionlists, Jan 7, 2010.

  1. #1
    So i am currently in the process of creating a forum and blog posting service, and wanted to add this feature.

    First, I wanted to implement this 'formula', for lack of a better word. What I want to do is pay my poster the following way:

    *The poster who posts the most gets paid $.10 per post
    *The poster who posts the second most posts gets paid $.09 per post
    *The poster who posts the third most posts gets paid $.08 per post
    and so on..

    Is there a way where I can get the system to recognize who posted the most, and then pay them their respective amounts based on what 'position' they come in, or do I have to do that manually?
     
    taktionlists, Jan 7, 2010 IP
  2. iAreCow

    iAreCow Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I bet you have a (MySQL) database for the system...
    SELECT `user` FROM `users` ORDER BY `users`.`posts` DESC LIMIT 0, 3
     
    Last edited: Jan 7, 2010
    iAreCow, Jan 7, 2010 IP
  3. taktionlists

    taktionlists Peon

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What does all of that mean?
     
    taktionlists, Jan 7, 2010 IP
  4. iAreCow

    iAreCow Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #4
    It selects 3 users who have posted the most, then you can INSERT the new rewards level for example
     
    iAreCow, Jan 7, 2010 IP
  5. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I don't understand why people try and do something if they don't understan the fundamentals of what is required.

    That above query is also just a pointer in the correct location, its naturally narrow in its catchment.. since it will always favour the people who have been using your forum the longest...
    I'll let you figure out why to try and help you flex your brainmuscles.
     
    Kalyse, Jan 8, 2010 IP
  6. iAreCow

    iAreCow Peon

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #6
    @Kalyse
    True! You cant let everybody else do the hard work for you and enjoy the revenue yourself.
    You could exclude the admin for example, WHERE `ID` > 1
     
    iAreCow, Jan 8, 2010 IP
  7. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Why can't you just handle it at the time of posting...
     
    NeoCambell, Jan 9, 2010 IP
  8. taktionlists

    taktionlists Peon

    Messages:
    194
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I'm not letting anyone do all the hard work. I am making he site, not them. I just wanted to make the payment process a little easier than what it would have to be without that script.
     
    taktionlists, Jan 9, 2010 IP