I know this is possible I just dont know how to the code or how to phrase it to search for the answer I need. I am pretty sure I need to use JOIN but again I am finding it hard to find an example to get the correct syntax.
I have 3 tables. An events table, which contains events that occur on different machines and their times. So for questions purposes events had 4 fields:
EVENTS
I then have a table "machines" which lists all of the machines:
MACHINES
then lastly i have the Department table:
DEPARTMENTS
I want to select all events that occur in a department. So say i want all events from events where the department_id of the machine the event occured on is = 1.