Jump to content

Need some guidence- MYSQL and sports stats...


renegade44

Recommended Posts

Hey guys, I am in the middle of creating a web site to host a Madden League. I am getting ready to delve into getting all of the stats right, and have user control systems where they can input the stats from their games, and also keep track of league leaders and standings,etc.

 

I simply dont know where to begin. I know its probably a crazy idea, but I have the time and patience to learn how to do this stuff I just need to know what I am trying to learn how to do.

 

I am assuming I will need to work out of a mysql database, and then I would need PHP in order to get the stuff to show up. I also have the problem of creating forms for the guys to fill out which take the stats and apply them to the database.

 

Any help or guidance would be greatly appreciated.

Link to comment
Share on other sites

Hey.

 

Using mysql is probably a good idea (as there is plenty of info on the web that can help you out, if you are not familiar with it) , but any database will work for you.

 

Are you familiar with php? You could use another language if you have more experience with it, most languages out there can talk to most databases.

 

In terms of setting everything up, I would start with the database.

 

Now i'm assuming that you do not have a lot of experience with mysql (my apologies if i'm wrong here)

 

Not being at all familiar with madden leagues, i would say a good place to start would be to work out what stats you are going to need to allow people to input and what stats you are going to generate.

 

Also working out what data you are going to need for this section of the website will help you get an idea of how to structure your database. It is best if you can put things into categories and then create tables for each category (so to speak)

 

It's going to be a fairly involved task i would imagine, but if you can give me some idea on what sort of data you are looking to use i'd be more than happy to give you some pointers if i can

;D

 

 

Link to comment
Share on other sites

ALlt F4 Thanks!

 

I do not have alot of experience with mysql. I have set up a few databases before and set up some tables but beyond that no experience.

 

Basically if you go to a place like ESPN.com and look at their scores, league leaders and standings, this is essentially what I am trying to do.

 

Basically each individual game that is played will entail certain stats that need to be put in by the user.

 

The league leaders, standings,etc dont get put in, they pull their info from the individual games stats.

 

 

 

now here is some of my confusion. I sit here and say OK, lets input the game stats into a database first, then link  the league leaders,standing,etc.

but then I say well for game stats, you need games, so do I put in the schedule first, and for the schedule I need users so do I put in the teams first.

 

Like I go in a circle LOL.

 

Hope this gives you a better idea of what Im trying to do.

Link to comment
Share on other sites

i would start with the teams and work from there. It doesn't matter where you start really, as you can always edit the tables afterwards, but it will be easier if you do the specific stuff last (like the stats).

 

Be sure to include id fields in your tables so you can link data between them.

Link to comment
Share on other sites

see attached database example to get you started. i would add each type of stat as a different table ie passing, rushing etc

 

run the script in the file to add the example tables to your database.

 

[attachment deleted by admin]

Link to comment
Share on other sites

ALT f4,

 

Thank you for putting that together!

 

I put it into my database, all looks good. The questions this engenders run deep LOL.

 

I guess where I would be stuck is translating this to the web. Basically I can get the database stuff onto a web page. This isnt the issue.

 

My issue is from a content management standpoint. As an example, the schedule. I basically need like a dropdown menu on the website that will allow me to select each weeks matchups. I would assume by having the teams in their portion, I can have the "games" table update via what is input via the dropdowns? Does that make sense?

 

The website www.leaguedaddy.com hosts stats and its essentially what I am trying to do, if you want I can email you my log in there so you can see how that works and what I am trying to do, theres no sensitive info on the site so its no prob.

 

 

And also, thank you for taking the time to help me out man. I know it took some time to type of the database info, it means alot to me.

Link to comment
Share on other sites

No problems!

 

I basically need like a dropdown menu on the website that will allow me to select each weeks matchups. I would assume by having the teams in their portion, I can have the "games" table update via what is input via the dropdowns? Does that make sense?

 

Yep your pretty much on the money there.

 

I tell you what - i'm knocking off work now so i'll whip up a quick example of the how you would use php to set up your schedule and then you can have a look and play around with that to get you started.

 

And also, thank you for taking the time to help me out man

 

No problems at all, its good to see someone trying to learn.

Link to comment
Share on other sites

I dont know how familiar you are with php, but i have attached a zip file of a couple of basic pages (no formatting or anything)

 

There is some ajax in there also but you dont need to use it if you dont want to.

 

I have also separated the logic from the presentation so that there is little php code on the actual html pages.

You dont have to take this approach, i just prefer it, makes it cleaner i think.

 

Let me know if you need clarification on any of it

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

ALT,

 

thank you for setting that up for me! I am going to get knee deep into it and check it out.

 

One thing I wanted to ask you, if you were me where would you go for more in depth training? Do you have a book that you used to become proficient, or a website?

 

Thanks for your help man. I am sure getting this straight will engender more questions, but you have already helped me a million times over.

 

Thanks!!

Link to comment
Share on other sites

No probs,

 

I learnt PHP at tafe a few years ago. The book that i used was "PHP Programming with MySQL" by Don Gosselin, its about $70 on amazon,but i'm sure that there a plenty of books out there that will help you learn.

 

I can send you my copy if you want to save some $, i don't use it any more.

 

I found the best way to learn was to try stuff out. The internet and this forum i have always found to be extremely helpful for stuff i don't get

 

Feel free to ask if you have questions, i'll try to help out if i can

Link to comment
Share on other sites

Alt,

 

I am def. going to have to become more knowledgable at PHP in general. Looking at your files and messing around at first its like OK, its minimal, etc. But when i look at your database.php file, this is where I get overwhelmed. I wish I could just type that stuff like I do html LOL, I will check out that book. I gotta learn this stuff.

 

The file you attached will help me figure some things out bro. Thanks

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.