Home | Webstore
Latest News: OOTP 13 THIRD Update Available: Version 13.3.9! - OOTP 13 Released! Download Now! - iOOTP 2012 Available NOW on the AppStore - Title Bout Championship Boxing 2.5 released!

Download OOTP 13 Now! | Download iOOTP 2012 from the AppStore

Go Back   OOTP Developments Forums > Out of the Park Baseball 10 > OOTP 10 - General Discussions

Reply
 
LinkBack Thread Tools Display Modes
Old 12-16-2009, 02:34 PM   #1 (permalink)
Major Leagues
 
wellsoliver's Avatar
 
Join Date: Aug 2009
Location: San Diego, CA
Posts: 320
Thanks: 15
Thanked 19x in 15 posts
mysql exports question

Is there some way to determine the stint of a player within a year? Meaning if you run the query:

Quote:
SELECT *
FROM `players_career_batting_stats`
WHERE player_id = 23005
ORDER BY `year` DESC;
You might get multiple entries for the same year if he went through the minors, or was traded among teams. It'd be nice to be able to further order this query to order them by the most recent within the year.

I suppose you could do something with joining the games table and using the date field there, but just wondering if there's an easier way.
wellsoliver is offline   Reply With Quote
Old 12-17-2009, 01:48 PM   #2 (permalink)
Hall Of Famer
 
fhomess's Avatar
 
Join Date: Nov 2002
Posts: 2,749
Thanks: 15
Thanked 275x in 125 posts
Quote:
Originally Posted by wellsoliver View Post
Is there some way to determine the stint of a player within a year? Meaning if you run the query:

You might get multiple entries for the same year if he went through the minors, or was traded among teams. It'd be nice to be able to further order this query to order them by the most recent within the year.

I suppose you could do something with joining the games table and using the date field there, but just wondering if there's an easier way.
There's no way to determine stint from the SQL tables other than matching on the games table, which is only maintained for the current season. You will want to filter by split, though. In the career_batting and career_pitching tables, split_id=1 corresponds to regular season games. Obviously, you do have team_id and league_id fields, but there isn't any way to figure out what order they occurred in without the games table.
__________________
StatsLab11 - PHP/MySQL based utilities for Online Leagues
Other Mods:
19th Century: Schedules, FaceGen
BBCards: 1887 Allen & Ginter, 1934 Goudey, 1988 Score, 1996 fhomess, 2005 fhomess
FaceGen: 1960-Pres MLB, 32 Colleges, Backgrounds

PEBA - Connecticut Nutmeggers
fhomess is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:25 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0
Copyright © 2009 Out of the Park Developments