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','|');

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34119-2bef9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34119-2bef9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?