sportsmanagementModelTeamInfo::getSeasons 344 data
SELECT pt.id as ptid, pt.team_id as season_team_id, pt.picture, pt.info, pt.project_id AS projectid,pt.points_finally,pt.neg_points_finally,pt.finaltablerank,pt.champion,pt.matches_finally,pt.won_finally,pt.draws_finally,pt.lost_finally,pt.homegoals_finally,pt.guestgoals_finally,p.name as projectname,p.season_id,p.current_round, pt.division_id,s.name as season,t.id as team_id,st.picture as season_picture,l.name as league, t.extended as teamextended, l.country as leaguecountry,CONCAT_WS( ':', p.id, p.alias ) AS project_slug,CONCAT_WS( ':', t.id, t.alias ) AS team_slug
FROM bd_sportsmanagement_project_team AS pt
INNER JOIN bd_sportsmanagement_season_team_id AS st ON st.id = pt.team_id
INNER JOIN bd_sportsmanagement_team AS t ON t.id = st.team_id
INNER JOIN bd_sportsmanagement_project AS p ON p.id = pt.project_id
INNER JOIN bd_sportsmanagement_season AS s ON s.id = p.season_id
INNER JOIN bd_sportsmanagement_league AS l ON l.id = p.league_id
WHERE t.id = 16
ORDER BY s.name DESC, p.name
sportsmanagementModelTeamInfo::getSeasons 345 projectteamid
10
sportsmanagementModelTeamInfo::getSeasons 346 teamid
16
sportsmanagementModelTeamInfo::getPlayerCount 556 data
SELECT COUNT(*) AS playercnt
FROM bd_sportsmanagement_person AS ps
INNER JOIN bd_sportsmanagement_season_team_person_id AS tp ON tp.person_id = ps.id
INNER JOIN bd_sportsmanagement_season_team_id AS st ON st.team_id = tp.team_id AND st.season_id = tp.season_id
INNER JOIN bd_sportsmanagement_project_team AS pt ON st.id = pt.team_id
WHERE pt.project_id = 2 AND pt.id = 10 AND tp.season_id = 2 AND st.season_id = 2 AND ps.published = 1 AND tp.persontype = 1
sportsmanagementModelTeamInfo::getPlayerMeanAge 608 data
SELECT ps.birthday, ps.deathday
FROM bd_sportsmanagement_person AS ps
INNER JOIN bd_sportsmanagement_season_team_person_id AS tp ON tp.person_id = ps.id
INNER JOIN bd_sportsmanagement_season_team_id AS st ON st.team_id = tp.team_id AND st.season_id = tp.season_id
INNER JOIN bd_sportsmanagement_project_team AS pt ON st.id = pt.team_id
WHERE pt.project_id = 2 AND pt.id = 10 AND tp.season_id = 2 AND st.season_id = 2 AND tp.published = 1 AND ps.published = 1 AND tp.persontype = 1
sportsmanagementModelTeamInfo::getPlayerMarketValue 707 data
SELECT SUM(stp.market_value) AS market_value
FROM bd_sportsmanagement_season_team_person_id AS stp
INNER JOIN bd_sportsmanagement_season_team_id AS st ON st.team_id = stp.team_id
INNER JOIN bd_sportsmanagement_project_team AS pt ON pt.team_id = st.id
WHERE pt.project_id = 2 AND pt.id = 10 AND st.season_id = 2 AND stp.season_id = 2 AND stp.published = 1 AND stp.persontype = 1