I have two MySQL queries.
The first shows what training has been done by a person. The second shows what training is required for a job.
First query
select training from coursescompleted where person='$person'
Second query
select j.job, r.training from riskstraining r join jobsrisks j on j.risk=r.Risk
As an example, the output of the first query (training completed) is:
first aid course
Firesystems course
And the output of the second query (training needed) is:
Security Guard - Firesystems Course
Crane Operator - Driving LicenseCourse
Crane Operator - first aid course
How do I combine these queries to show what courses are required in order to do a job? As per the example below, if I chose the job ‘crane operator’, the result should be ‘Driving License Course’ as the person has already completed the ‘first aid course’. A join will show the results where they match, not where they don’t match.
Desired output – where ‘crane operator’ is chosen
crane operator - driving license course
Any advice or guidance on what the query should be?
something like that I guess.