Balance

Discussion in 'Programming' started by cmdrAdam, Feb 1, 2015.

  1. #1
    Hello!

    I have a website with membership and the question is that I want to implement a balance system where users can earn money. Is the balance just an extra integer in the database table for their earnings or do I have to do or implement something to my website?
     
    cmdrAdam, Feb 1, 2015 IP
  2. Shahzad Jameel

    Shahzad Jameel Well-Known Member

    Messages:
    189
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    148
    #2
    No need to increase the size of DB. Make a function to calculate the balance and then print the value using that function on any place on your website.
     
    Shahzad Jameel, Feb 3, 2015 IP
  3. cmdrAdam

    cmdrAdam Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    Ok, but every user has his own balance. Do you mean that the balance is calculated through a function and the calculation is based on how many clicks they've generated? If so than thanks for the answer!
     
    cmdrAdam, Feb 3, 2015 IP
  4. Shahzad Jameel

    Shahzad Jameel Well-Known Member

    Messages:
    189
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    148
    #4
    Yes, that function will calculate on the basis of user.
     
    Shahzad Jameel, Feb 3, 2015 IP