Subversion Repositories VORC

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 - 1
## View: v_games
2
#
3
# +--------------+--------------+------+-----+---------+-------+
4
# | Field        | Type         | Null | Key | Default | Extra |
5
# +--------------+--------------+------+-----+---------+-------+
6
# | id           | int(11)      | NO   |     | 0       |       |
7
# | teams        | varchar(262) | YES  |     | NULL    |       |
8
# | date         | date         | NO   |     | NULL    |       |
9
# | dayofweek    | varchar(9)   | YES  |     | NULL    |       |
10
# | time         | varchar(23)  | YES  |     | NULL    |       |
11
# | start_time   | time         | NO   |     | NULL    |       |
12
# | end_time     | time         | NO   |     | NULL    |       |
13
# | volhours     | double       | YES  |     | NULL    |       |
14
# | track        | varchar(45)  | NO   |     | NULL    |       |
15
# | level        | varchar(45)  | NO   |     | NULL    |       |
16
# | restrictions | varchar(45)  | YES  |     | NULL    |       |
17
# | gtype        | varchar(45)  | NO   |     | NULL    |       |
18
# | notes        | mediumtext   | YES  |     | NULL    |       |
19
# +--------------+--------------+------+-----+---------+-------+
20
 
21
CREATE OR REPLACE VIEW `v_games` AS select `game`.`id` AS `id`,concat_ws(' ',`game`.`title`,`game`.`team1`,'vs.',`game`.`team2`) AS `teams`,`game`.`date` AS `date`,dayname(`game`.`date`) AS `dayofweek`,concat(convert(time_format(`game`.`time`,'%H:%i') using utf8mb4),' - ',convert(time_format(`game`.`end_time`,'%H:%i') using utf8mb4)) AS `time`,`game`.`time` AS `start_time`,`game`.`end_time` AS `end_time`,(trim((time_to_sec(timediff(`game`.`end_time`,`game`.`time`)) / 3600)) + 0) AS `volhours`,`game`.`track` AS `track`,`game`.`level` AS `level`,`game`.`restrictions` AS `restrictions`,`game`.`type` AS `gtype`,`game`.`notes` AS `notes` from `game` order by `game`.`date`,`game`.`track`,concat(convert(time_format(`game`.`time`,'%H:%i') using utf8mb4),' - ',convert(time_format(`game`.`end_time`,'%H:%i') using utf8mb4)),`game`.`type`