jd| Posted July 23, 2006 Share Posted July 23, 2006 Hi I’m creating a site for my golf society and I have come to a stand still and am unsure on how to continue.I have a form that inputs a score for each member this is recorded in a table along with the course id. When all the data is entered I need to adjust everyone’s handicap based on certain rules the handicap is stored in a different table. i.e · The winnings handicap has 2 strokes deducted from their handicap· Anyone with more than 36 points has 0.5 deducted from their handicap· Anyone three points below the winner will receive 0.1 onto their handicap · Anyone six points below the winner will receive 0.2 onto their handicap. The problem is I think I can write the “if else” statements to cover all the eventualities but I have no clue on how to loop the data through the loop.Any help would be greatly appreciated. JD Link to comment https://forums.phpfreaks.com/topic/15386-manipulating-table-data/ Share on other sites More sharing options...
jd| Posted July 24, 2006 Author Share Posted July 24, 2006 Anyone have an suggestions ?JD Link to comment https://forums.phpfreaks.com/topic/15386-manipulating-table-data/#findComment-62913 Share on other sites More sharing options...
ober Posted July 24, 2006 Share Posted July 24, 2006 This is in a database, right?If so, you can update with SQL statements:$query = "UPDATE scoring_table SET handicap = handicap + .1 WHERE userid = x" Link to comment https://forums.phpfreaks.com/topic/15386-manipulating-table-data/#findComment-62944 Share on other sites More sharing options...
jd| Posted July 24, 2006 Author Share Posted July 24, 2006 Yes its mysql. But the problem I have is the query to excute all the members table one after each other and the if events for this Link to comment https://forums.phpfreaks.com/topic/15386-manipulating-table-data/#findComment-63003 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.