In one of the leagues I'm applying the website we have 3 different leagues running under the same organisation. We would like to have the ratings calculated over all the games played, which requires a more complex database setup. Some of the core tables and some of the league specific tables need to be shared, which can be achieved with MySQL's Views.
DROP TABLE ipl_users CREATE VIEW ipl_users AS SELECT * FROM master.ipl_users
SELECT a.id+1 AS start, MIN(b.id) - 1 AS end FROM master AS a, master AS b WHERE a.id < b.id GROUP BY a.id HAVING start < MIN(b.id)
| Joomla 1.5 Core | Joomla 3.x Core | Bethico League Extension |
|---|---|---|
| ipl_users | ipl_users | ipl_ipl_bar |
| ipl_session | ipl_session | ipl_ipl_date |
| ipl_stats_agents | ipl_usergroups | ipl_ipl_game |
| ipl_core_acl_aro | ipl_user_notes | ipl_ipl_map |
| ipl_core_acl_aro_groups | ipl_user_profiles | ipl_ipl_match |
| ipl_core_acl_aro_map | ipl_user_usergroup_map | ipl_ipl_player |
| ipl_core_acl_aro_sections | ipl_viewlevels | ipl_ipl_player_game |
| ipl_core_acl_groups_aro_map | ipl_ipl_season | |
| ipl_ipl_site | ||
| ipl_ipl_tournament |