cags Posted October 21, 2009 Share Posted October 21, 2009 A while back I was bored and decided I'd write a simple site for tracking progress in my local 8 Ball Pool league, it gradually got more complicated as I added more features and I'll no doubt end up posting a few threads in the MySQL section about sorting out some of the querys, but thats another matter. I'm sort of stuck as to where to go from here. The site currently allows me to track venues, teams and players in independent leagues. Our local league actually runs various different competitions each season. In the winter season there is the 'normal' league, but there is also knock out cups including singles, doubles, super 4s, divisional cup and league cup. My problem is I'm not entirely sure a.) how to implent a knockout ladder system correctly b.) how to integrate it with what I currently have. If you want you can check out what the site currently looks like... http://www.meltonpool.netii.net username: test@test.com password: test I've attached a diagram showing a basic outline of my database structure. Any help or advice would be greatly appreciated. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/178475-league-site/ Share on other sites More sharing options...
lmhart Posted October 21, 2009 Share Posted October 21, 2009 Could you explain the knock out ladder system. I believe that would help determine how to implement the db. My first thought is that their will be a table with users info and a table with the ladder. Each would be given an initial ranking (user_ranking) and as they play each other and if someone beats a higher ranked user the DB would be updated by getting the ranking from the db and then swapping the values. Pseudocode create user table create ladder table assign initial ranking to each user competition when player1 and player2 play if the lower rank player wins then retrieve the ranks and switch else nothing viewing rankings select * from ladder table order by ranking ASC This is just a draft and I may be way off Quote Link to comment https://forums.phpfreaks.com/topic/178475-league-site/#findComment-941296 Share on other sites More sharing options...
cags Posted October 21, 2009 Author Share Posted October 21, 2009 Ladder wasn't perhaps the best term to use. They are knockout cups ie you start with x amount of teams, after each round you have x/2 teams left in the tournament. You win, you move on, you loose, your knocked out. Basically like the latter stages of pretty much any sporting cup. Eg. Wimbledon, the World Cup, the FA Cup, etc, etc. Quote Link to comment https://forums.phpfreaks.com/topic/178475-league-site/#findComment-941316 Share on other sites More sharing options...
lmhart Posted October 21, 2009 Share Posted October 21, 2009 This should help you http://bracket-tracker.sourceforge.net/ Quote Link to comment https://forums.phpfreaks.com/topic/178475-league-site/#findComment-941332 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.