you dont need a join, the gallery images are stored in a folder that is named with a number.
look in the files system on your server, you will see in the images folder for the gallery, a folder named 6, with the gallery images inside it.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.