I have a testimonials table and a scientificStudies table. When a user views an essential oil related testimonial on my website, I want to also check if there are any rows in the scientificStudy table that contain a match. Both tables have a topics column that may be filled with one or several keyword topics.
Row 1 - topic column: pets, animals, tumor, infection
Row 1 - topic column: lavender, cancer, tumor
Row 2 - topic column: lemon, cleaning
Row 3 - topic column: oregano, tumor, infection
The user reads the essential oil related testimonial that has “pets, animals, tumor” as topics, should also see the rows 1 and 3 from the scientificStudies table because of their common topic, tumor and infection. I assume this is a many to many relationship, and I’m new to this.
Can someone point me in the right direction to a good article online that would help me put this together? I’ve tried Googling the topic, but most tutorials use ID numbers as the common link between the two tables. In this case, I’m trying to link them on any particular topic that the rows in each table have in common. I hope this makes sense.