Sql matches all the lines that own the content based on one content

clipboard.png

interestaaa
list

clipboard.png

Mar.15,2021

this needs to be queried twice. First query interest,split and then go to the second table to match with like


it is recommended that you add another table showing the relationship between tag content and content id, for example:

< table > < thead > < tr > < th > id < / th > < th > tag < / th > < / tr > < / thead > < tbody > < tr > < td > 1 < / td > < td > E-commerce < / td > < / tr > < tr > < td > 1 < / td > < td > Haitao < / td > < / tr > < tr > < td > 1 < / td > < td > Movie < / td > < / tr > < / tbody > < / table >

this is easy to maintain and easy to implement.


it turns out that it can be written with a sql statement. Use MySQL regularization to match. REGEXP REPLACE ('e-commerce, sports, music','|');

Menu