Hi Geschenk,
After looking around at a few different forums here is how I
solved the problem.
via the terminal I created a new column in my images table
called 'artist_id" , I populated this column with the corresponding
id from the artists table :
UPDATE images, artists SET images.artist_id = artists.id
WHERE CONCAT(artists.first_name, artists.last_name) = images.artist
I then adjusted the form which inserts a new image to also
add the correct artist_id , for new images that are added.
My final SELECT statement which is giving me the results I
need :
SELECT * FROM artists, images WHERE artists.id =
images.artist_id AND ((images.caption LIKE '%$keyword%') ||
(images.piece_name LIKE '%$keyword%') ||
(images.show_title LIKE '%$keyword%')) GROUP BY
artists.last_name
Yeah the surname always begins with a cap. Will try out that
pattern matching etc code you suggested , it could be useful for a
later application
Thanks for taking the time to look at my coding issue.