I have this diagram which should explain my situation I need some help on joining 3 tables which I have no idea how to do this kind of thing:

So I can go through a while loop of retrieving the records by doing this:
<img src="<?php echo $row['filename']; ?>" alt="" />
Album: <?php echo $row['album_name']; ?>
AlbumID: <?php echo $row['album_id']; ?>
Using an INNER JOIN will prevent returning albums that don’t have images. The ORDER BY … DESC will sort the results in descending order but I’m not sure how to only return the last record. It would take some sort of combination of ORDER BY, GROUP BY and TOP, perhaps.