I took a look at your attached php page, noticed you have 3 recordsets on there, not sure why.
if you upload a copy or an image of your artists and artwork tables i will take a look, (I cannot see the screenshot of the tables you say are in post #1)
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.