Both sides previous revision
Poprzednia wersja
Nowa wersja
|
Poprzednia wersja
|
pl:dydaktyka:ztb:2011:projekty:trener:projekt_logiczny [2011/06/19 20:14] ztb2011 |
pl:dydaktyka:ztb:2011:projekty:trener:projekt_logiczny [2019/06/27 15:50] (aktualna) |
| |
__Matches__ - tabela przechowująca dane o rozegranych meczach: | __Matches__ - tabela przechowująca dane o rozegranych meczach: |
mts_id - integer, NOT NULL - id meczu | * mts_id - integer, NOT NULL - id meczu |
* mts_host - integer, NOT NULL - id drużyny gospodarzy | * mts_host - integer, NOT NULL - id drużyny gospodarzy |
* mts_guest - integer, NOT NULL - id drużyny gości | * mts_guest - integer, NOT NULL - id drużyny gości |
| |
==== Usuwanie meczu ==== | ==== Usuwanie meczu ==== |
delete from fth_matches | update fth_players set pl_matches = pl_matches - 1, pl_goals = pl_goals - ( |
where mts_id = 3; | |
| select count(*) from fth_stats |
| where sts_match = 1 |
| AND sts_player = 79 |
| AND sts_event ='G'), |
| pl_ycards = pl_ycards - ( |
| select count(*) from fth_stats |
| where sts_match = 1 |
| AND sts_player = 79 |
| AND sts_event ='Y'), |
| pl_rcards = pl_rcards - ( |
| select count(*) from fth_stats |
| where sts_match = 1 |
| AND sts_player = 79 |
| AND sts_event ='R') where pl_id =79; |
| |
| delete from fth_match_set where mset_match = 1; |
| |
| delete from fth_stats where sts_match = 1; |
| |
| delete from fth_matches where mts_id = 1; |
| |
==== Dodawanie transferu ==== | ==== Dodawanie transferu ==== |
insert into fth_transfers values(9,'Tue May 17 00:00:00 CEST 2011',9,'Tue May 17 00:00:00 CEST 2011',9,9,10,1) | insert into fth_transfers values(9,'Tue May 17 00:00:00 CEST 2011',9,'Tue May 17 00:00:00 CEST 2011',9,9,10,1) |
| |
| ==== Dodawanie statystyki meczowej ==== |
| insert into fth_match_set values(137,'2011-05-17',137,'2011-05-17',137,6,76,6,'O',0,90); |
| |
| ==== Dodawanie zawodnika ==== |
| insert into fth_players values(10,'Tue May 17 00:00:00 CEST 2011',10,'Tue May 17 00:00:00 CEST 2011',10,'Sun Jun 14 00:00:00 CEST 1998','Nowogard ','L',76,14,0,0,0,0,0,10,1); |
| |
| ==== Dodawanie roli ==== |
| insert into fth_roles values(51,'TRN','trainer'); |
| |
| |