新手求教,大神们,多表模糊查询后,获得的内容数量如何传到分页中?
数据库中测试的查询:
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

{php $query=urlencode('sql语句');} {sql sql='$query'} {$t.字段} {/sql} {$debug} {$pages}{php $query=urlencode('sql语句');} {sql sql='$query'} {$t.字段} {/sql} {$debug} {$pages}debug
标签解析:{list action=sql sql='select+%2A+from+%28select+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_news+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%0Aunion+all%0Aselect+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_qcp+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%0Aunion+all%0Aselect+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_zhuanr+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR++content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%0Aunion+all%0Aselect+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_tix+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR++content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%0Aunion+all%0Aselect+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_zhin+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR++content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%0Aunion+all%0Aselect+title%2Ckeywords%2Cinputtime%2Cdescription%2Curl%2Ccontent+from+dr_1_wend+where+title+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR+keywords+like+%22%25%E5%87%BA%E7%A7%9F%25%22+OR++content+like+%22%25%E5%87%BA%E7%A7%9F%25%22%29+AS+a' order=hits page=1 pagesize=5 urlrule=index.php?s=tag&c=home&m=index&name=chepai&module=&type=&page=[page]}查询解析: 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 LIMIT 0,5开发模式:已开启数据缓存:开发者模式下缓存无效总记录数:6分页功能:已开启当前页码:1总页数量:2每页数量:5分页地址:index.php?s=tag&c=home&m=index&name=chepai&module=&type=&page=页码可用字段:title、keywords、inputtime、description、url、content