I have a table customer that stores a customer_id, email and reference. There is an additional table customer_data that stores a historical record of the changes made to the
SELECT CONCAT(title,' ',forename,' ',surname) AS name * FROM customer c INNER JOIN customer_data d on c.id=d.customer_id WHERE name LIKE '%Smith%'
i think you need to change c.customer_id to c.id
else update table structure