SQL join 3 tables

Georgio

New Member
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: \[code\]select event from images where category is $category\[/code\]Is there a way to join category to images aswell?\[code\]$query = "SELECT e.eventFROM images iINNER JOIN event e ON e.eventID = i.eventIDWHERE event = '".$specificEvent."'";\[/code\]
 
Back
Top