Hello all, I'll try to explain what I'm wanting to do the best way I can. I have an event_results table that contains multiple athlete id's and for each athlete they are tied to an event in the same table. The screen shots should help explain. I also created a ranktable that contains a score for each place there would be. IE: 1st place is 100pts 2nd place is 97pts and so on. In this event_results table there is a eventrank column and eventscore column. I want to create a button/function that will update those two columns with the correct rank/score based off the results. I'm thinking that a massive mysql select/join/insert statement is needed but I'm not really sure if that's the best approach for this or not. I'm also not that good with sql so am having a little problem coming up with a correct ranking/join statement. I've tried a few but they've not worked. I'm thinking there will have to be 10 updates as well since there are 10 different events that need to be ranked. The file attached is just examples I through into excel. I can give the
db schema if you'd like.
Thanks for any help.