多表多字段模糊匹配关键词

审核中 Mysql 未结 已结 置顶 精帖
删除 置顶 取消置顶 加精 取消加精
66 0
yswl
yswl VIP3 2021-09-04 11:04:23
悬赏:60金币 编辑此贴

多表多字段模糊匹配关键词

select * from (
select title,keywords,inputtime,description,url,content from dr_1_news where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%"
union all
select title,keywords,inputtime,description,url,content from dr_1_qcp where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%"
union all
select title,keywords,inputtime,description,url,content from dr_1_zhuanr where title like "%出租%" OR keywords like "%出租%" OR  content like "%出租%"
union all
select title,keywords,inputtime,description,url,content from dr_1_tix where title like "%出租%" OR keywords like "%出租%" OR  content like "%出租%"
union all
select title,keywords,inputtime,description,url,content from dr_1_zhin where title like "%出租%" OR keywords like "%出租%" OR  content like "%出租%"
union all
select title,keywords,inputtime,description,url,content from dr_1_wend where title like "%出租'%" OR keywords like "%出租%" OR  content like "%出租%"
) AS a


数据库
Mysql 22