Tables below are the
Master - duration_lookup
Details1 - duration_matched
Details2 - boam
Master/Detail relationships
duration_lookup
.'match_id' = duration_matched
.'match_id'
duration_lookup
.'match_id' = boam
.'match_id'
below each table I have listed some records and made comments
CREATE TABLE duration_lookup
(
event_id
int(11) NOT NULL,
date
date default NULL,
Time
time default NULL,
match_id
int(11) default NULL,
group
int(11) default NULL,
rdscore
varchar(255) default NULL,
score
int(11) default NULL,
PRIMARY KEY (event_id
)
event_id,date,time,match_id, group
73200, 2017-01-01,10:08:10,5,5
event_id,date,time,match_id, group
48042, 2017-01-03,00:25:51:10,10
CREATE TABLE duration_matched
(
event_id
int(11) NOT NULL,
user_ID
int(11) default NULL,
date
date default NULL,
Time
time default NULL,
match_id
int(11) default NULL,
group
int(11) default NULL,
score
int(11) default NULL,
PRIMARY KEY (event_id
)
the link from duration lookup finds 4 records in duration_matchedwhere the match_id = 5
event_id,date,time,match_id, group
73200,2017-01-01,10:08:10,5,5
64144,2017-01-01,10:08:10,5,5
52471,2017-01-01,10:08:10,5,5
47876,2017-01-01,10:08:10,5,5
the link from duration lookup finds 4 records in duration_matched where the match_id = 10
event_id,date,time,match_id, group
48042, 2017-01-03,00:25:51:10,10
52681,2017-01-03,00:25:51:10,10
7337,2017-01-03,00:25:51:10,10
60743,2017-01-03,00:25:51:10,10
CREATE TABLE boam
(
Date
date default NULL,
Time
time default NULL,
camera
varchar(255) default NULL,
match_id
int(11) NOT NULL,
video
varchar(255) default NULL,
boam_id
int(11) NOT NULL,
PRIMARY KEY (match_id
)
the duration lookup on match_id find no records in boam with a match_id=5
boam_id,date,time,match_id,video
the duration lookup on match_id finds 1 record in boam with a match_id=10
boam_id,date,time,match_id,video
4,2017-01-03,00:25:51,10,0
There wil allways be records found in duration_matched (the first tab) and sometimes there will be records in boam (the second tab)
but the script to hide the boam tab seems to do nothing and the tab is displayed even when there are no records
Regards
John B