[分享]帝国6.6多表查询免费分享了
演示站点:http://www.qlwww.com/e/search/result/index1.php?searchid=28
感谢 秋天的无名 提供的思路
结合mysql数据库 union
$tbname=" ( select id,classid,newspath,keyboard,keyid,userid,username,ztid,checked,istop,truetime,ismember,dokey,userfen,isgood,titlefont,titleurl,filename,groupid,newstempid,plnum,firsttitle,isqf,totaldown,title,newstime,closepl,infopfen,infopfennum,votenum from mg_ecms_download union select id,classid,newspath,keyboard,keyid,userid,username,ztid,checked,istop,truetime,ismember,dokey,userfen,isgood,titlefont,titleurl,filename,groupid,newstempid,plnum,firsttitle,isqf,totaldown,title,newstime,closepl,infopfen,infopfennum,votenum from mg_ecms_movie union select id,classid,newspath,keyboard,keyid,userid,username,ztid,checked,istop,truetime,ismember,dokey,userfen,isgood,titlefont,titleurl,filename,groupid,newstempid,plnum,firsttitle,isqf,totaldown,title,newstime,closepl,infopfen,infopfennum,votenum from mg_ecms_news ) a ";
要注意的几点 并不是把要查询的表所有的字段都加上 mysql 联合查询 要求要查询的表的字段必须是一样的
下面的是utf-8的格式
上传以下附件: [下载 *.zip](文件大小:5.01 KB,下载次数:97)
|
懒的写~~
|
|