I have a table 'images' which contains foreign keys from the tables 'event' and 'category'.
I have a function that displays all the events.
I'm able to select all events that are associated with pics in the images table, but i want to add another condition for category like:
select event from images where category is $category
Is there a way to join category to images aswell?
$query = "SELECT e.event
FROM images i
INNER JOIN event e
ON e.eventID = i.eventID
WHERE event = '".$specificEvent."'";