MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL 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 Dev Shed Forums Sponsor:
  #31  
Old March 1st, 2011, 12:18 PM
kenny70 kenny70 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2011
Posts: 30 kenny70 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 34 m 53 sec
Reputation Power: 3
Quote:
Originally Posted by cafelatte
You're right, it IS an old thread!

Until the whistle blows, isn't the 'final score' simply the 'latest score' !?!?


Correct just found that out after playing around with the script, great bit of code as it does everthing i been trying to do for a month

kenny

Reply With Quote
  #32  
Old October 15th, 2012, 04:04 AM
willr willr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 10 willr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
How would you go about comparing the previous position with the latest position for each club in the table?

Reply With Quote
  #33  
Old October 15th, 2012, 04:54 AM
cafelatte cafelatte is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Mar 2008
Posts: 1,923 cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level)cafelatte User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 5 Days 16 h 21 m 8 sec
Reputation Power: 377
That is (potentially) too big a question to be so quietly tacked on to the end of such an ancient thread.

Reply With Quote
  #34  
Old October 15th, 2012, 05:14 AM
willr willr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 10 willr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
Does it really matter if the thread is ancient? I'm just merely asking how it can be achieved. I'm sure
Guelphdad would have some idea, as I thought his SQL query was great.

Reply With Quote
  #35  
Old October 15th, 2012, 05:32 AM
r937's Avatar
r937 r937 is online now
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 26,357 r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 2 Days 4 h 42 m 44 sec
Reputation Power: 4140
Quote:
Originally Posted by willr
Does it really matter if the thread is ancient?
yup, it does

i, for one, just don't feel like reading two entire pages of a dead thread to get up to speed on some database design that you likely aren't even using

what you should do is present a test case, in a new thread, that gives your table layout, sample rows, and the results you want from the query that you want help with

that's s.o.p. for asking a forum question
Comments on this post
cafelatte agrees!
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book

Reply With Quote
  #36  
Old October 15th, 2012, 05:51 AM
willr willr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 10 willr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
I'm actually using what Guelphdad posted on page 2 of this thread, as I'm just trying to add things to it. So, I should create a new thread with what Guelphdad's already posted?

Reply With Quote
  #37  
Old October 16th, 2012, 10:02 AM
jemagee jemagee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2009
Posts: 41 jemagee User rank is Corporal (100 - 500 Reputation Level)jemagee User rank is Corporal (100 - 500 Reputation Level)jemagee User rank is Corporal (100 - 500 Reputation Level)jemagee User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 8 m 57 sec
Reputation Power: 9
Database Design Input

I looked at the database design and I must admit that I find it incorrect in terms of how it does home and away teams.

I don't know european football but I have built a database for basketball that mimics this basic idea, and the table with the teams in the games doesn't work (ideally) in my opinion.

In theory it seems like you want to have all the home/away team in the same database table, but when yo uwant to do queries to find a teams record/performance based on whether or not they are home or away - it becomes complicated to write the queries.

I've found that when you create these tables you have a 'parent' games table that is pretty basic with specific information, game date, location if it matters, attendance, stuff specific to the GAME itself.

Then you have a 'teams in the game' table. which has a foreign key that references the games table, a field for the team name, a field for whether the team was home or away and a field for whether the team won or lost, this allows easier queries. (If you don't want to track scoring by halfs/overtime yo ucan also put the final score in this field)

I don't really understand the standings question you are asking, if you want a running standings, I've built a query for that too (using american baseball day by day records) and it's a query that aliases the same table three times.

I don't know european football but I do know 'league creation' databases, please let me know if you want some help with the normalization as the version on page 2 isn't properliy normalized in my opinion

Reply With Quote
  #38  
Old October 20th, 2012, 12:57 PM
willr willr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 10 willr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 2 m 42 sec
Reputation Power: 0
yes, please if can help with the normalization that would be great. If you visit this url "bbc.co.uk/sport/football/premier-league/table", I think you'll understand what i meant. Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > Football League Table [design / layout / relations]

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap