Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old May 5th, 2003, 12:14 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
creating tables

Hi Guys,

I'm creating a football statistics site, for my local team.

I know how to create a table, however I think for what I want to do, I might need to create 2 tables.

1 table for plays, 1 table for teams.

What I am doing is recording things like goals scored, tries scored etc, by each player against each team.

It can be done on 1 table, however it means I would have to create a lot of different fields, such as, goals_team1, goals_team2, tries_team1, tries_team2, and so on. There is over 15 teams and about 7 different stats that would be recored, so 15 x 7 would be a lot of fields, and that would mean having to create each team .php page seperately, as the output would be coming from a field with a different name.

So what I would to do is have it so the fields are the same, just the rows are different. example.

goals tries tackles
team 1
team 2
team 3
team 4

however where would I put the players name? I heard something about putting the players on a different table and linking the player to the team using an ID.

I have no idea about this and am hoping someone could assist me.

Also, is it possible to add (+) data from 2 different tables? example - player 1 gets 2 goals against team 1 and 3 goals against team 2. On the .php page, can you run a query to add those 2 fields and make it out put the total goals? Would it be a simple query or a long one?

Thanks

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > creating tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway