联系官方销售客服
1835022288
028-61286886
新手求教,大神们,多表模糊查询后,获得的内容数量如何传到分页中?
数据库中测试的查询:
select sum(a.b) as num from ( select count("title,keywords,inputtime,description,url,content") as b from dr_1_news where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" union all select count("title,keywords,inputtime,description,url,content") as b from dr_1_qcp where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" union all select count("title,keywords,inputtime,description,url,content") as b from dr_1_zhuanr where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" union all select count("title,keywords,inputtime,description,url,content") as b from dr_1_tix where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" union all select count("title,keywords,inputtime,description,url,content") as b from dr_1_zhin where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" union all select count("title,keywords,inputtime,description,url,content") as b from dr_1_wend where title like "%出租%" OR keywords like "%出租%" OR content like "%出租%" ) as a
查询结果是13条
目前查询到的数量是 6个模型的数量,如何传入从所有模型中查询内容的数量?
页面执行查询语句
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
debug