---------------------
class Player(SQLObject):
PlayerID = IntCol(length=10, alternateID=True, default=None)
FirstName = StringCol(length=20, default=None)
LastName = StringCol(length=30, default=None)
Position = StringCol(length=2, default=None)
TeamID = IntCol(length=5, default=None)
PlayerNum = StringCol(length=3, default=None)
class PStats(SQLObject):
PlayerID = IntCol(length=10, alternateID=True, default=None)
Year = IntCol(length=4, default=None)
Games = FloatCol(length=3)
Goals = IntCol(length=3)
Assists = IntCol(length=3)
Points = IntCol(length=4)
PIM = IntCol(length=4)
class GStats(SQLObject):
PlayerID = IntCol(length=10, alternateID=True, default=None)
Year = IntCol(length=4, default=None)
Games = FloatCol(length=3)
Goals = IntCol(length=3)
Assists = IntCol(length=3)
Points = IntCol(length=4)
PIM = IntCol(length=4)
Shutouts = IntCol(length=3)
GA = FloatCol(length=3)
GF = IntCol(length=3)
GAA = FloatCol(length=4)
class TStat(SQLObject):
TeamID = IntCol(length=5, alternateID=True, default=None)
Name = StringCol(Length=20, default=None)
Year = IntCol(length=4, default=None)
Wins = IntCol(length=3)
Lost = IntCol(length=3)
Ties = IntCol(length=3)
--------------------------------
How do I connect the data in these tables?
I want to print the player data and their stats and then the team
stats.
basically like this right?
while not at the end of the DB
print player record
print pstat where pstat.PlayerID == player.PlayerID
print Tstat where Tstat.TeamID == player.TeamID
is that the right layout for a join like that?