Aeolus Posted August 19, 2009 Share Posted August 19, 2009 :-\ Kind of a strange title, but here's what I'm trying to do. I assume I'll need an array, which I am very poor at, so... I have a table (competition results), which holds competition id competion level username user's scores rank (calculated and stored based off scores) points (currently empty) count of users in the competition >> I may drop this if it's more efficient to obtain and count these when I'm calculating points instead of off on it's own, it's only there for point counting and a simple echo. What I'd like is to calculate points based off of the level of the event, the player's placing, and the number of players entered in the event. I'd like to insert the points earned into the event result table for future reference and counting. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/ Share on other sites More sharing options...
Aeolus Posted August 19, 2009 Author Share Posted August 19, 2009 Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-901935 Share on other sites More sharing options...
mikesta707 Posted August 19, 2009 Share Posted August 19, 2009 I would suggest not having a count, and just getting the count whenever you calculate the points. if you really want to store the count, store it in a different table. (called competitions of something, which you could link to the other table via the unique competition id) How exactly do you want to calculate the points? Is it simple math? What your describing sounds pretty straight forward. Just query the table, get the information for each player by iterating the mysql_results and update your other table. Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-901941 Share on other sites More sharing options...
ignace Posted August 19, 2009 Share Posted August 19, 2009 It would help if you provided some more in-depth information about what your idea is like what are you trying to build? Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-901951 Share on other sites More sharing options...
Aeolus Posted August 19, 2009 Author Share Posted August 19, 2009 I'm trying to build a points table of sorts... Let me see if I can get it on here Top row represents # of entrants, left column represents rank 12345... 1st12345... 2nd01234... etc... so that each time another entrant is there, the points go up. I wouldn't mind if they only went up in increments of 5 (so for every five entrants, points went up) and I only want up to 10th place player to be awarded points. Does that help? Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-901974 Share on other sites More sharing options...
Aeolus Posted August 19, 2009 Author Share Posted August 19, 2009 bump Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-902024 Share on other sites More sharing options...
Aeolus Posted August 20, 2009 Author Share Posted August 20, 2009 bump Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-902248 Share on other sites More sharing options...
Aeolus Posted August 20, 2009 Author Share Posted August 20, 2009 I am going to try making a point_scale table and getting the information from there... I'm sure there's a more efficient way of doing this, but this page also won't see a lot of traffic and won't be accessible to most people on the site, so it shouldn't be an issue at least until I can find a better way to do this. Quote Link to comment https://forums.phpfreaks.com/topic/171008-creating-dynamic-variable/#findComment-902270 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.