If I have one table:
- IMAGES with columns imageID, Image, and categoryID*(this being the foreign key)
and 2nd table
- CATEGORIES with columns categoryID, Category
and peform query for example: $sql = "SELECT categoryID FROM IMAGES WHERE image = 'exampleImage'";
I would get the result as an integer of the category ID i.e 1
My question is what would be the query to display the category that the ID belongs to? Or any suggestions on how to work around with multiple queries.