Jump to content

Website Help and Opinions


bwyant32

Recommended Posts

Ok I am into sports games for the PS3 and I help run a baseball league for MLB 12 The Show. We currently use a website for stat tracking called LeagueDaddy (http://www.leaguedaddy.com). I created this site (http://www.stlbleague.com) and I am pulling player stats from the LeagueDaddy site and exporting them into my databases. What I would like to do is set up a database structure so we can enter stats on our server and they will be updated in real time. Now I have figured out how to use the .php?id feature (as you can see here http://www.stlbleague.com/tm.php?tid=10).

 

Now I have an idea for a database structure and here it is:

 

Players Table - ID, Name, Photo, Age, other personal info

Stats Table - Player ID, and then all the player's stats

Teams Table - Team ID, and all the general Team Info

Schedules Table - Game ID, Team IDs as the home and away team

 

 

Those are the 4 major tables that I would need. I already have the players and teams tables set up properly. My question is, how could I get stats to store for each individual game so I could pull standings and many other things?  Is this a reasonable idea given what I already have set up? What would you recommend that I look at as for a tutorial on how to do this?

 

There is a site www.nnlcentral.com that already achieves what I want but for a different game; I welcome all tips and suggestions :)

Link to comment
Share on other sites

In the Stats table, I wouldn't store a player's lifetime stats. I'd add the Game ID, and store stats for each player for each individual game. You could then add or average stats whenever you need to, and you'd be able to check stats per game, per season, or lifetime as needed.

 

Make sure to include the game date in the schedules table to help with selecting which games are in a particular season.

 

In the player's table, I'd include the player's current team id, while in the stats table, I'd include the team id he played on for those stats. That way you can calculate team stats, and if a player changes teams, the stats still point to both him and the team he was playing on for that game, with the added benefit that you could calculate an individual player's stats on a per team basis.

Link to comment
Share on other sites

In the Stats table, I wouldn't store a player's lifetime stats. I'd add the Game ID, and store stats for each player for each individual game. You could then add or average stats whenever you need to, and you'd be able to check stats per game, per season, or lifetime as needed.

 

Make sure to include the game date in the schedules table to help with selecting which games are in a particular season.

 

In the player's table, I'd include the player's current team id, while in the stats table, I'd include the team id he played on for those stats. That way you can calculate team stats, and if a player changes teams, the stats still point to both him and the team he was playing on for that game, with the added benefit that you could calculate an individual player's stats on a per team basis.

 

That shouldn't be too hard to add. I do have the team Id in the players table, forgot to mention that. Now how would you go about creating the schedule and posting scores and stats through a web form for each and every game within the schedule?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.