In another table, called topics, 2 represents the topic called pinkeye. The following query works great, as long as a given testimonialID is not already assigned the pinkeye topic.
How can this query be tweaked so that it doesn’t produce duplicate entry errors?
Thanks!
INSERT
INTO testimonialTopics
( testimonialID
, topicID )
SELECT testimonialID
, 2
FROM testimonials
WHERE title like '%pinkeye%'