简体   繁体   中英

How do I get similar domains from database using tags?

I do have 100k domain names with tags... table has got only two column called domain and tags .

Tags are stored with coma after each tags. I want fine how many domains with similar tags say search,google,searchengine,engine,web,reference with all of them or any of them in it. How do I do it?

Without knowing exactly how you want to implement this, here's some SQL to get you started:

SELECT *
FROM domains
WHERE 
  tag LIKE '*search*' OR
  tag LIKE '*google*' OR
  tag LIKE '*searchengine*' OR
  tag LIKE '*engine*' OR
  tag LIKE '*web*' OR
  tag LIKE '*reference*'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM