richiec Posted June 9, 2009 Share Posted June 9, 2009 Not really sure how to explain this so ill try best i can any help would be much appreciated because this is really stressing my head out and its probably something soooo simple ill end up crying myself to sleep! lol anyways... Ok i have a website, a kind of auction site but for a game, members of the site earn points by doing different things on the game and then every week they all get to use the points they have earned and stored up to bid on items that we have won. Ok that side of it all works fine, no problems there however i wanted to make a change currently they can only bid on 2 items at a time (which works fine) it will put there first bid value from DB and then add the new bid and then check to see if they have enough points to cover it.. Works fine but the change i want to make right now is to remove that filter so they can bid on any amount of items that they want. The problem i am having with that is because each bid is its own DB row how can i add up each current bid that that person has to check it against the amount of points they have to spend to see if they have earned enough points to cover all of there bids? Hope you understand that and can help as i said its driving me abit crazy hah ~Rich Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted June 9, 2009 Share Posted June 9, 2009 Use SQL SUM() function. Quote Link to comment Share on other sites More sharing options...
richiec Posted June 9, 2009 Author Share Posted June 9, 2009 After spending about 10 mins to find a decent page which explains how to use the fuction i got it working and it works perfectly!! Thank you very much!!! ~Rich Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.